Пример #1
0
        private void button_Upd_Click(object sender, RoutedEventArgs e)
        {
            /// <summary>
            /// Used to add a photograph.  Launches dialog box to enter photograph information.
            /// </summary>
            EditPhotograph editPh = new EditPhotograph();
            bool           action = (bool)editPh.ShowDialog();

            if (action == true)
            {
                // Add photograph to main list
                photographList.AddPhotograph(editPh.textBox_title.Text,
                                             DateTime.Parse(editPh.textBox_dateTaken.Text), editPh.textBox_description.Text,
                                             editPh.textBox_artistName.Text, editPh.textBox_keywords.Text,
                                             editPh.textBox_fileLocation.Text);
                // Add photograph to display list
                displayList.AddToDisplay(editPh.textBox_title.Text,
                                         DateTime.Parse(editPh.textBox_dateTaken.Text), editPh.textBox_description.Text,
                                         editPh.textBox_artistName.Text, editPh.textBox_keywords.Text,
                                         editPh.textBox_fileLocation.Text);
                // Update original photograph object
                refreshBrowseList();
            }
        }
Пример #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.EditPhotograph1 = ((PhotoViewer.EditPhotograph)(target));
                return;

            case 2:
                this.label_Title = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.label_dateTaken = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.label_description = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.label_artistName = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.label_keywords = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.label_fileLocation = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.textBox_title = ((System.Windows.Controls.TextBox)(target));
                return;

            case 9:
                this.textBox_dateTaken = ((System.Windows.Controls.TextBox)(target));
                return;

            case 10:
                this.textBox_description = ((System.Windows.Controls.TextBox)(target));
                return;

            case 11:
                this.textBox_artistName = ((System.Windows.Controls.TextBox)(target));
                return;

            case 12:
                this.textBox_keywords = ((System.Windows.Controls.TextBox)(target));
                return;

            case 13:
                this.textBox_fileLocation = ((System.Windows.Controls.TextBox)(target));
                return;

            case 14:
                this.button_Cancel = ((System.Windows.Controls.Button)(target));

            #line 22 "..\..\EditPhotograph.xaml"
                this.button_Cancel.Click += new System.Windows.RoutedEventHandler(this.button_Cancel_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.button_OK = ((System.Windows.Controls.Button)(target));

            #line 23 "..\..\EditPhotograph.xaml"
                this.button_OK.Click += new System.Windows.RoutedEventHandler(this.button_OK_Click);

            #line default
            #line hidden
                return;

            case 16:
                this.button_Select = ((System.Windows.Controls.Button)(target));

            #line 24 "..\..\EditPhotograph.xaml"
                this.button_Select.Click += new System.Windows.RoutedEventHandler(this.button_Select_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }