예제 #1
0
 protected override void buttonProperties_Click(object sender, EventArgs e)
 {
     using (PropertiesDialog propertiesDialog = new PropertiesDialog((T)currentSelected))
     {
         propertiesDialog.ShowDialog(this);
     }
 }
예제 #2
0
        private void _DisplayPackedProperties(object sender, EventArgs e)
        {
            // Displays properties Dialog for packed file
            // EVO_149: multiple file support

            foreach (string anotherPath in _GetSelectedFilePaths())
            {
                try
                {
                    Cursor = Cursors.WaitCursor;

                    // Preparing
                    string           viewFileName = EditHelper.Instance.PrepareFile(_CurrentBnkFile, anotherPath);
                    PropertiesDialog dialog       = new PropertiesDialog(viewFileName);

                    dialog.Show(this);
                }
                catch (Exception ex)
                {
                    string message = string.Format(_ERROR_PACK_PROPERTIES_FAILED, anotherPath);

                    MessageBoxes.ShowError(this, new Exception(message, ex));
                }
                finally
                {
                    Cursor = Cursors.Default;
                }
            }
        }
예제 #3
0
        protected override AsyncAction CreateAction(out bool cancelled)
        {
            Program.AssertOnEventThread();
            cancelled = false;

            AsyncAction action = null;

            using (PropertiesDialog propertiesDialog = new PropertiesDialog(VM))
            {
                propertiesDialog.SelectVMCPUEditPage();

                propertiesDialog.FormClosing += (s, ee) =>
                {
                    if (propertiesDialog.DialogResult == DialogResult.Yes && ee.Action != null)
                    {
                        ee.StartAction = false;
                        action         = ee.Action;
                    }
                };

                propertiesDialog.ShowDialog(Program.MainWindow);
                if (propertiesDialog.DialogResult != DialogResult.Yes || action == null)
                {
                    cancelled = true;
                }
            }

            return(action);
        }
        private void RootOnMouseLeftButtonUp(object sender, MouseButtonEventArgs args)
        {
            Series series = ((SeriesTitleLabel)DataContext).Series;


            if (!(series is IChartElementPropertyAble))
            {
                return;
            }

            if (series is Indicator)
            {
                Indicator ind = (Indicator)series;

                ind.ShowParametersDialog();
                return;
            }

            IChartElementPropertyAble    propertyAble = (IChartElementPropertyAble)series;
            List <IChartElementProperty> properties   = new List <IChartElementProperty>(propertyAble.Properties);
            PropertiesDialog             dialog       = new PropertiesDialog(propertyAble.Title, properties)
            {
#if WPF
                Owner = series._chartPanel._chartX.OwnerWindow,
#endif
                Background = series._chartPanel._chartX.LineStudyPropertyDialogBackground
            };

#if SILVERLIGHT
            dialog.Show();
#endif
#if WPF
            dialog.ShowDialog();
#endif
        }
예제 #5
0
        internal void LsContextMenuChoose(int menuId)
        {
            switch (menuId)
            {
            case 0:     //properties
                if (ContextAbleLineStudy.LineStudy != null)
                {
                    IChartElementPropertyAble propertyAble = ContextAbleLineStudy.LineStudy;

                    List <IChartElementProperty> properties = new List <IChartElementProperty>(propertyAble.Properties);
                    PropertiesDialog             dialog     = new PropertiesDialog(propertyAble.Title, properties)
                    {
#if WPF
                        Owner = ContextAbleLineStudy.Chart.OwnerWindow,
#endif
                        Background = ContextAbleLineStudy.Chart.LineStudyPropertyDialogBackground
                    };

#if SILVERLIGHT
                    //dialog.Show(Dialog.DialogStyle.ModalDimmed);
                    dialog.Show();
#endif
#if WPF
                    dialog.ShowDialog();
#endif
                }
                break;

            case 1:     //delete
                ContextAbleLineStudy.Chart.RemoveObject(ContextAbleLineStudy.LineStudy);
                break;
            }
        }
예제 #6
0
 private void toolStripButtonEdit_Click(object sender, EventArgs e)
 {
     using (PropertiesDialog propertiesDialog = new PropertiesDialog(currentSelected))
     {
         propertiesDialog.ShowDialog(this);
     }
 }
예제 #7
0
        protected void Execute(IXenObject xenObject)
        {
            PropertiesDialog dialog = new PropertiesDialog(xenObject);

            dialog.SelectTab(_tab);
            dialog.SelectControl(_control);
            dialog.ShowDialog(Parent);
        }
예제 #8
0
 private void EditSelectedVdis()
 {
     if (EditButton.Tag is VDI vdi)
     {
         using (var dlg = new PropertiesDialog(vdi))
             dlg.ShowDialog(this);
     }
 }
 protected virtual void Execute(IXenObject xenObject)
 {
     using (PropertiesDialog dialog = new PropertiesDialog(xenObject))
     {
         dialog.EditName();
         dialog.ShowDialog(Parent);
     }
 }
 protected override void Execute(IXenObject xenObject)
 {
     using (PropertiesDialog dialog = new PropertiesDialog(xenObject))
     {
         dialog.EditIqn();
         dialog.ShowDialog(Parent);
     }
 }
 protected override void Execute(IXenObject xenObject)
 {
     using (PropertiesDialog dialog = new PropertiesDialog(xenObject))
     {
         dialog.SelectVdiSizeLocationPage();
         dialog.ShowDialog(Parent);
     }
 }
 protected override void Execute(IXenObject xenObject)
 {
     using (PropertiesDialog dialog = new PropertiesDialog(xenObject))
     {
         dialog.SelectLogDestinationEditPage();
         dialog.ShowDialog(Parent);
     }
 }
예제 #13
0
        [TestProperty("Ignore", "True")] // GH#7282 - investigate and reenable
        public void CheckExperimentalDisableState()
        {
            using (RegistryHelper reg = new RegistryHelper())
            {
                reg.BackupRegistry(); // manipulating the global v1/v2 state can affect the registry so back it up.

                using (CmdApp app = new CmdApp(CreateType.ProcessOnly, TestContext))
                {
                    using (PropertiesDialog properties = new PropertiesDialog(app))
                    {
                        properties.Open(OpenTarget.Defaults);

                        using (Tabs tabs = new Tabs(properties))
                        {
                            // check everything stays enabled when global is on.
                            AutoHelpers.LogInvariant("Check that items are all enabled when global is enabled.");
                            tabs.SetGlobalState(Tabs.GlobalState.ConsoleV2);

                            // iterate through each tab
                            AutoHelpers.LogInvariant("Checking elements on all tabs.");
                            foreach (TabBase tab in tabs.AllTabs)
                            {
                                tab.NavigateToTab();

                                IEnumerable <AppiumWebElement> itemsUnaffected  = tab.GetObjectsUnaffectedByV1V2Switch();
                                IEnumerable <AppiumWebElement> itemsThatDisable = tab.GetObjectsDisabledForV1Console();

                                foreach (AppiumWebElement obj in itemsThatDisable.Concat(itemsUnaffected))
                                {
                                    Verify.IsTrue(obj.Enabled, AutoHelpers.FormatInvariant("Option: {0}", obj.Text));
                                }
                            }

                            // check that relevant boxes are disabled when global is off.
                            AutoHelpers.LogInvariant("Check that necessary items are disabled when global is disabled.");
                            tabs.SetGlobalState(Tabs.GlobalState.ConsoleV1);

                            foreach (TabBase tab in tabs.AllTabs)
                            {
                                tab.NavigateToTab();

                                IEnumerable <AppiumWebElement> itemsUnaffected  = tab.GetObjectsUnaffectedByV1V2Switch();
                                IEnumerable <AppiumWebElement> itemsThatDisable = tab.GetObjectsDisabledForV1Console();

                                foreach (AppiumWebElement obj in itemsThatDisable)
                                {
                                    Verify.IsFalse(obj.Enabled, AutoHelpers.FormatInvariant("Option: {0}", obj.Text));
                                }
                                foreach (AppiumWebElement obj in itemsUnaffected)
                                {
                                    Verify.IsTrue(obj.Enabled, AutoHelpers.FormatInvariant("Option: {0}", obj.Text));
                                }
                            }
                        }
                    }
                }
            }
        }
예제 #14
0
        private void editPlacementPolicyButton_Click(object sender, System.EventArgs e)
        {
            var pool = Helpers.GetPool(xenObject.Connection);

            using (PropertiesDialog propertiesDialog = new PropertiesDialog(pool ?? xenObject))
            {
                propertiesDialog.SelectPoolGpuEditPage();
                propertiesDialog.ShowDialog(this);
            }
        }
예제 #15
0
        private void buttonProperties_Click(object sender, EventArgs e)
        {
            var row = SelectedVmssRow;

            if (row != null)
            {
                using (PropertiesDialog propertiesDialog = new PropertiesDialog(row.Policy))
                    propertiesDialog.ShowDialog(this);
            }
        }
예제 #16
0
 private void ItemPropertiesLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (_items?.Count > 0)
     {
         PropertiesDialog.ShowPropertiesDialog(_items[1].Properties);
     }
     else
     {
         MessageBox.Show("No items have been selected.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
예제 #17
0
        public static async Task OpenPropertiesWindowAsync(object item, IShellPage associatedInstance)
        {
            if (item == null)
            {
                return;
            }

            if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8))
            {
                CoreApplicationView newWindow = CoreApplication.CreateNewView();
                ApplicationView     newView   = null;

                await newWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async() =>
                {
                    Frame frame = new Frame();
                    frame.Navigate(typeof(Properties), new PropertiesPageNavigationArguments()
                    {
                        Item = item,
                        AppInstanceArgument = associatedInstance
                    }, new SuppressNavigationTransitionInfo());
                    Window.Current.Content = frame;
                    Window.Current.Activate();

                    newView = ApplicationView.GetForCurrentView();
                    newWindow.TitleBar.ExtendViewIntoTitleBar = true;
                    newView.Title            = "PropertiesTitle".GetLocalized();
                    newView.PersistedStateId = "Properties";
                    newView.SetPreferredMinSize(new Size(400, 500));
                    newView.Consolidated += delegate
                    {
                        Window.Current.Close();
                    };

                    bool viewShown = await ApplicationViewSwitcher.TryShowAsStandaloneAsync(newView.Id);
                    if (viewShown && newView != null)
                    {
                        // Set window size again here as sometimes it's not resized in the page Loaded event
                        newView.TryResizeView(new Size(400, 550));
                    }
                });
            }
            else
            {
                var propertiesDialog = new PropertiesDialog();
                propertiesDialog.propertiesFrame.Tag = propertiesDialog;
                propertiesDialog.propertiesFrame.Navigate(typeof(Properties), new PropertiesPageNavigationArguments()
                {
                    Item = item,
                    AppInstanceArgument = associatedInstance
                }, new SuppressNavigationTransitionInfo());
                await propertiesDialog.ShowAsync(ContentDialogPlacement.Popup);
            }
        }
예제 #18
0
        private void _DisplayProperties(object sender, EventArgs e)
        {
            // Displays properties Dialog
            // EVO_149: multiple file support
            foreach (ListViewItem anotherItem in bnkListView.SelectedItems)
            {
                string           fileName = bnkStatusLabel.Text + @"\" + anotherItem.Text;
                PropertiesDialog dialog   = new PropertiesDialog(fileName);

                dialog.Show(this);
            }
        }
예제 #19
0
 private async void Button_Click(object sender, RoutedEventArgs e)
 {
     AppSettings.ThemeModeChanged -= AppSettings_ThemeModeChanged;
     if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 8))
     {
         await propWindow.CloseAsync();
     }
     else
     {
         var propertiesDialog = new PropertiesDialog();
         propertiesDialog.Hide();
     }
 }
예제 #20
0
 public OperationState createProperties()
 {
     try
     {
         string           functionality    = FunctionalitiesCode.PROPERTIES_FUNCTIONALITY;
         PropertiesDialog propertiedDialog = new PropertiesDialog();
         propertiedDialog.display();
         return(OperationState.CONTINUE);
     }
     catch (Exception)
     {
         return(OperationState.STOP);
     }
 }
예제 #21
0
        private void linkLabelPoolProperties_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
        {
            var pool = Helpers.GetPoolOfOne(Connection);

            if (pool == null)
            {
                return;
            }

            using (PropertiesDialog propertiesDialog = new PropertiesDialog(pool))
            {
                propertiesDialog.SelectClusteringEditPage();
                propertiesDialog.ShowDialog(this);
            }
        }
예제 #22
0
 public void ShowPropertiesDialog(DownloadItemBase ent, ShortState?state)
 {
     using var propWin    = PropertiesDialog.CreateFromGladeFile(GetMainWindow(), GetWindowGroup());
     propWin.FileName     = ent.Name;
     propWin.Folder       = ent.TargetDir ?? FileHelper.GetDownloadFolderByFileName(ent.Name);
     propWin.Address      = ent.PrimaryUrl;
     propWin.FileSize     = FormattingHelper.FormatSize(ent.Size);
     propWin.DateAdded    = ent.DateAdded.ToLongDateString() + " " + ent.DateAdded.ToLongTimeString();
     propWin.DownloadType = ent.DownloadType;
     propWin.Referer      = ent.RefererUrl;
     propWin.Cookies      = state?.Cookies ?? state?.Cookies1 ?? new Dictionary <string, string>();
     propWin.Headers      = state?.Headers ?? state?.Headers1 ?? new Dictionary <string, List <string> >();
     propWin.Run();
     propWin.Destroy();
     propWin.Dispose();
 }
예제 #23
0
        }     // MulticastScanner_ScanCompleted

        private void menuItemChannelDetails_Click_Implementation(object sender, EventArgs e)
        {
            if (ListManager.SelectedService == null)
            {
                return;
            }

            using (var dlg = new PropertiesDialog()
            {
                Caption = Properties.Texts.BroadcastServiceProperties,
                ItemProperties = ListManager.SelectedService.DumpProperties(),
                Description = string.Format("{0}\r\n{1}", ListManager.SelectedService.DisplayLogicalNumber, ListManager.SelectedService.DisplayName),
                ItemIcon = ListManager.SelectedService.Logo.GetImage(LogoSize.Size64, true),
            })
            {
                dlg.ShowDialog(this);
            } // using
        }     // menuItemChannelDetails_Click_Implementation
예제 #24
0
        private static void AddCustomFieldsToRow(IXenObject o, GridRow row)
        {
            foreach (CustomFieldDefinition customFieldDefinition in CustomFieldsManager.GetCustomFields())
            {
                GridStringItem customFieldItem = new GridStringItem(
                    new CustomFieldWrapper(o, customFieldDefinition),
                    HorizontalAlignment.Center, VerticalAlignment.Middle,
                    false, false, TextBrush, Program.DefaultFont,
                    new EventHandler(delegate
                {
                    PropertiesDialog dialog = new PropertiesDialog(o);
                    dialog.SelectPage(dialog.CustomFieldsEditPage);
                    dialog.ShowDialog();
                }));

                row.AddItem(CustomFieldsManager.CUSTOM_FIELD + customFieldDefinition.Name, customFieldItem);
            }
        }
예제 #25
0
        private void propertiesButton_Click(object sender, EventArgs e)
        {
            // Click on 'Properties...' button
            if (editTasksListView.SelectedItems.Count != 0)
            {
                try
                {
                    string           currentFile = editTasksListView.SelectedItems[0].SubItems[_COLUMN_INDEX_WORKING_FILE].Text;
                    PropertiesDialog dialog      = new PropertiesDialog(currentFile);

                    dialog.Show(this);
                }
                catch (Exception ex)
                {
                    MessageBoxes.ShowError(this, ex);
                }
            }
        }
예제 #26
0
        } // buttonRefreshServiceProviderList_Click_Implementation

        private void buttonProviderDetails_Click_Implementation(object sender, EventArgs e)
        {
            if (SelectedServiceProvider == null)
            {
                return;
            }

            using (var dlg = new PropertiesDialog()
            {
                Caption = Properties.DiscoveryTexts.SPProperties,
                ItemProperties = SelectedServiceProvider.DumpProperties(),
                Description = SelectedServiceProvider.DisplayName,
                ItemIcon = SelectedServiceProvider.Logo.GetImage(LogoSize.Size64, true),
            })
            {
                dlg.ShowDialog(this);
            } // using
        }     // buttonProviderDetails_Click_Implementation
        private void RootOnMouseLeftButtonUp(object sender, MouseButtonEventArgs args)
        {
            Series series = ((SeriesTitleLabel)DataContext).Series;

            //if (!(series is IChartElementPropertyAble)) return;

            if (series is Indicator)
            {
                Indicator ind = (Indicator)series;

                //07-06-2012 - Comentado por Felipe, inveertido pelo bloco abaixo
                //ind.ShowParametersDialog();

                ind.FireEditIndicator(ind);


                //fim da alteração

                return;
            }
            else
            {
                series.FireEditSerie(series);

                return;
            }

            IChartElementPropertyAble    propertyAble = (IChartElementPropertyAble)series;
            List <IChartElementProperty> properties   = new List <IChartElementProperty>(propertyAble.Properties);
            PropertiesDialog             dialog       = new PropertiesDialog(propertyAble.Title, properties)
            {
#if WPF
                Owner = series._chartPanel._chartX.OwnerWindow,
#endif
                Background = series._chartPanel._chartX.LineStudyPropertyDialogBackground
            };

#if SILVERLIGHT
            dialog.Show();
#endif
#if WPF
            dialog.ShowDialog();
#endif
        }
예제 #28
0
        private void linkLabelGotoStorageLinkProperties_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            IXenObject o = Helpers.GetPool(Connection);

            if (o == null)
            {
                var hosts = Connection.Cache.Hosts;
                if (hosts.Length > 0)
                {
                    o = hosts[0];
                }
            }

            if (o != null)
            {
                var dialog = new PropertiesDialog(o);
                dialog.Load += (s, ee) => dialog.SelectPage(dialog.StorageLinkPage);

                dialog.FormClosing += (s, ee) =>
                {
                    if (dialog.DialogResult == DialogResult.Yes && ee.Action != null)
                    {
                        ee.StartAction       = false;
                        ee.Action.Completed += ss =>
                        {
                            if (ee.Action.Succeeded)
                            {
                                Program.Invoke(Program.MainWindow, () =>
                                {
                                    int comboBoxItemCount = comboBoxStorageSystem.Items.Count;
                                    PerformStorageSystemScan();
                                    comboBoxStorageSystem.DroppedDown = comboBoxStorageSystem.Items.Count > comboBoxItemCount;
                                });
                            }
                        };

                        new ActionProgressDialog(ee.Action, ProgressBarStyle.Marquee).ShowDialog(this);
                    }
                };

                dialog.Show(this);
            }
        }
예제 #29
0
        void OpenProjectProperties()
        {
            Project project = activeProject;

            using (PropertiesDialog dialog = project.CreatePropertiesDialog())
            {
                project.UpdateVars(false);
                dialog.SetProject(project);
                dialog.ShowDialog(pluginUI);

                if (dialog.PropertiesChanged)
                {
                    project.UpdateVars(true);
                    BroadcastProjectInfo(project);
                    project.Save();
                    menus.ProjectChanged(project);
                }
            }
        }
예제 #30
0
 protected void OnPropertiesActionActivated(object sender, EventArgs e)
 {
     if (appPal.Palette is GimpPalette)
     {
         var unboxed = appPal.Palette as GimpPalette;
         var pd      = new PropertiesDialog();
         pd.PaletteTitle    = unboxed.Name;
         pd.PaletteColumns  = unboxed.BucketSize;
         pd.PaletteComments = unboxed.Comments;
         if (pd.Run() == (int)ResponseType.Ok)
         {
             var p = (GimpPalette)unboxed.Clone();
             p.Name       = pd.PaletteTitle;
             p.BucketSize = pd.PaletteColumns;
             p.Comments   = pd.PaletteComments;
             appPal.SetPalette(p, action: "Properties Change");
         }
         pd.Destroy();
     }
 }
예제 #31
0
 private void buttonProperties_Click(object sender, EventArgs e)
 {
     using (PropertiesDialog propertiesDialog = new PropertiesDialog(currentSelected))
     {
         propertiesDialog.ShowDialog(this);
     }
 }
예제 #32
0
	protected virtual void OnPropertiesAction_Activated (object sender, System.EventArgs e)
	{
		PropertiesDialog propertiesDialog = new PropertiesDialog();
		propertiesDialog.Database = _database;
		propertiesDialog.Response += new Gtk.ResponseHandler(OnPropertiesAction_Response);
		propertiesDialog.ShowSourceCitation += OnShowSourceCitation;
		propertiesDialog.SelectNewNote += OnSelectNewNote;
		
		propertiesDialog.TransientFor = this;
		
		propertiesDialog.Show();
	}
예제 #33
0
 public PropertyDialogController()
 {
     _view = new PropertiesDialog(this as IPropertyDialogController);
 }