示例#1
0
        private void MenuItem_Click(object sender, RoutedEventArgs e)
        {
            SetupProfileWindow setupProfileWindow = new SetupProfileWindow();

            setupProfileWindow.SetupLayoutForAddingProfile();
            setupProfileWindow.ShowDialog();
            // Refresh Profile Selector
            cbxProfileSelector.ItemsSource   = null;
            cbxProfileSelector.SelectedIndex = Session.SelectedProfileIndex;
            cbxProfileSelector.ItemsSource   = Preferences.Profiles;
            if (Preferences.Profiles.Count != 0)
            {
                btnSettings.IsEnabled = true;
                btnSync.IsEnabled     = true;
                cbxSync.IsEnabled     = true;
            }
        }
示例#2
0
        private void btnSettings_Click(object sender, RoutedEventArgs e)
        {
            Session.SelectedProfileIndex = cbxProfileSelector.SelectedIndex;
            Session.Save();
            SetupProfileWindow setupProfileWindow = new SetupProfileWindow();

            setupProfileWindow.SetupLayoutForEditingProfile();
            setupProfileWindow.ShowDialog();
            // Refresh Profile Selector
            Preferences.Load();
            cbxProfileSelector.ItemsSource   = null;
            cbxProfileSelector.SelectedIndex = Session.SelectedProfileIndex;
            cbxProfileSelector.ItemsSource   = Preferences.Profiles;
            if (Preferences.Profiles.Count == 0)
            {
                btnSettings.IsEnabled = false;
                btnSync.IsEnabled     = false;
                cbxSync.IsEnabled     = false;
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.wdwSetupProfile = ((ZipVersionControl.SetupProfileWindow)(target));
                return;

            case 2:
                this.txtProfileName = ((System.Windows.Controls.TextBox)(target));

            #line 10 "..\..\SetupProfileWindow.xaml"
                this.txtProfileName.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.txtProfileName_TextChanged);

            #line default
            #line hidden
                return;

            case 3:

            #line 11 "..\..\SetupProfileWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);

            #line default
            #line hidden
                return;

            case 4:
                this.btnDone = ((System.Windows.Controls.Button)(target));

            #line 12 "..\..\SetupProfileWindow.xaml"
                this.btnDone.Click += new System.Windows.RoutedEventHandler(this.Button_Click_2);

            #line default
            #line hidden
                return;

            case 5:

            #line 13 "..\..\SetupProfileWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_3);

            #line default
            #line hidden
                return;

            case 6:
                this.txtZipFile = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:

            #line 16 "..\..\SetupProfileWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

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

            case 9:
                this.btnRemoveProfile = ((System.Windows.Controls.Button)(target));

            #line 19 "..\..\SetupProfileWindow.xaml"
                this.btnRemoveProfile.Click += new System.Windows.RoutedEventHandler(this.btnRemoveProfile_Click);

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