We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

CS411 Visual Programming Assignment No 02 Spring 2019 Solution & Discussion

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 2500

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Replies to This Discussion

Bhai is ka code ap na nhi mention kiya kindly ya b kar do 

    • Upon clicking “Submit” button, one of the following things may happen:
      • If any of field is blank it will show a dialog box.
    • VUID field is blank
    • Name field is blank
    • Write proper message.

     

    • Message has been saved dialog box. Dialog box title should be your “VUID”

ok bro

Bhai bna daty o portion b to assignment upload kar lata 

Someone plx send the code source as soon as possible. 

need coad files

extend date mili ha ya ni

Kindly Share code. Today is extended Day.

and tell me where is the problem in this code?

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.IO;
using System.Windows;
using System.Linq;
using System;
namespace Assignment_2
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private string filepath = @"C:\Users\Zahidx9\Desktop\cs411.txt";
public MainWindow()
{
InitializeComponent();

string[] data= loadDataFromFile();

loadDataInForm();
}

private void loadDataInFromFile(string[]data)
{
string[] data = File.ReadAllLines(filePath);
etName.Text = data[0];
etVUID.text = data[1];
cboxDegree.Text = data[2];
string gender = data[3];
if (gender.Equals("Male"))
{
rdMale.IsChecked = true;
}
else
{
rdFemale.IscChecked = true;
}
etComments.Text = data[4];
}

private void Button_Click(object sender, RoutedEventArgs e)
{
string[] data = GetDataFromForm();

File.WriteAllLines(filepath, data);
}

private readonly string[] dataFromForm;

private string[] GetDataFromForm()
{
return dataFromForm;
}

//1st line
string name = etName.Text;
//2st line
string etVUID = etName.Text;
//3st line
string degree = cboxDegree.Text;
//4st line
string gender = "Male";
private static object etVUID;

(rdMale.IsChecked == true)
{
gender= "Female";
}
string comments = etComments.Text;
string[] data = { name, VUID, Degree, Gender, Comments };
return data;
}
private void window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
string[] datafromform = getdataFromForm();
string dataFromFilr = loadDataFromFile();
if (DataFromFile.SequenceFile(datafromform == false)
{
MessageBoxResult result = MessageBox.Shoe("Do you want to save changes?, "Assignment ");
switch (result)
{
case MessageBoxResult.Yes:
string[] data = getDataFromForm();
File.WriteAllLines(filepath, data);
break;
case MessageBoxResult.No:

break;
case MessageBoxResult.Cancel:
e.Cancel = true;
breake;
}
}


}
}
}

@ Zahidx9 Front end design code(xeml) bi share karo Then errors dekhe keh bta skta

..  

using System.IO;using System.IO;using System.Windows;using System.Linq;namespace cs411_a2    {/// <summary>/// Interaction logic for MainWindow.xaml/// </summary>public partial class MainWindow : Window{private string filepath = @"C:\Users\user\Desktop\file.txt";public MainWindow(){ InitializeComponent(); loadDataFormFile();}
private void loadDataFormFile(){ string[] data= //File.ReadAllLines(filepath); etname.text = data[0]; etvuID.text = data[1]; cboxdegree.text = data[2]; string gender = data [3]; if (gender.equals("Male")) { rdmale.ischecked = true; } else { rdfemale.ischecked = true; } etcomments.text = data[4];
private void btnSubmit_Click(object sender, RoutedEventArgs e){
string[] data = getdataformform(); file.writeallLines(filepath, data);}private string[] getdataformform(){ // 1st line string name =etname.text; //2nd line string vuID =etvuID.text; //3rd line string degree = cboxdegree.text; //4th line string gender = "Male"; if(rdfemale.ischecked == true) { gender= "Female"; } //5th lines string comments = etcomments.text; string[] data = {name, vuID, degree, gender, comments }; return data; private void window_closing(object sender system.componentmodel.canceleventargs e) {   var result = messagebox.show("do you want to save changes ?") } }}  

koi visual studio par run kr day yeh code

xaml code

Window x:Class="Assignment_2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Assignment_2"
mc:Ignorable="d"
Title="MainWindow" Height="500" Width="800">
<Grid>
<Label Content="Name:" HorizontalAlignment="Left" Height="28" Margin="332,29,0,0" VerticalAlignment="Top" Width="174" FontSize="14" FontFamily="Arial"/>
<Label Content="VUID:" HorizontalAlignment="Left" Height="28" Margin="332,75,0,0" VerticalAlignment="Top" Width="174" FontSize="14" FontFamily="Arial"/>
<Label Content="Degree Program:" HorizontalAlignment="Left" Height="28" Margin="332,123,0,0" VerticalAlignment="Top" Width="174" FontSize="14" FontFamily="Arial"/>
<Label Content="Gender:" HorizontalAlignment="Left" Height="28" Margin="332,171,0,0" VerticalAlignment="Top" Width="174" FontSize="14" FontFamily="Arial"/>
<Label Content="Comments:" HorizontalAlignment="Left" Height="28" Margin="332,223,0,0" VerticalAlignment="Top" Width="174" FontSize="14" FontFamily="Arial"/>
<TextBox x:Name="name" HorizontalAlignment="Left" Height="28" Margin="534,29,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="194" TextChanged="TextBox_TextChanged" FontSize="14" FontFamily="Arial"/>
<TextBox x:Name="VUID" HorizontalAlignment="Left" Height="28" Margin="534,75,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="194" FontSize="14" FontFamily="Arial"/>
<RadioButton x:Name="Male" Content="Male" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="534,177,0,0" Checked="RadioButton_Checked" FontSize="14" FontFamily="Arial"/>
<RadioButton x:Name="Female" Content="Female" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="643,177,0,0" FontFamily="Arial" FontSize="14"/>
<ComboBox x:Name="degree" RenderTransformOrigin="2.458,-2.957" Margin="534,123,64,318" FontFamily="Arial" FontSize="14" SelectionChanged="ComboBox1_SelectionChanged">
<ComboBoxItem Content="BS Computer Science"/>
<ComboBoxItem Content="BS Physics"/>
<ComboBoxItem Content="BS Information Technology"/>
</ComboBox>
<TextBox x:Name="comments" HorizontalAlignment="Left" Height="125" Margin="534,223,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="194" FontFamily="Times New Roman"/>
<Button x:Name="button" Content="Submit" HorizontalAlignment="Left" Height="30" Margin="534,365,0,0" VerticalAlignment="Top" Width="194" Click="Button_Click" FontSize="14" FontFamily="Arial"/>
<Image Margin="69,101,526,158" Source="Untitled.png" Stretch="Fill"/>
</Grid>
</Window>

RSS

Today Top Members 

© 2020   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.