Пример #1
0
        protected override void OnActivated()
        {
            base.OnActivated();

            PreferencesDialog pd = new PreferencesDialog(TypPreferences.GlobalSetting,MainClass.Languages.Translate("settings"));
            int result = pd.Run();
            if (result == (int)ResponseType.Ok) {

                MainClass.Settings.SaveSettings();
                MainClass.MainWindow.ReloadSettings(true);

            }
            pd.Destroy();
        }
Пример #2
0
        protected override void OnActivated()
        {
            base.OnActivated();

            if (MainClass.Workspace.ActualProject == null){
                    MessageDialogs md =
                    new MessageDialogs(MessageDialogs.DialogButtonType.Ok, "Please, select project.", "", Gtk.MessageType.Error);
                    md.ShowDialog();
                return;
            }

            PreferencesDialog pd = new PreferencesDialog(TypPreferences.ProjectSetting,MainClass.Workspace.ActualProject,MainClass.Workspace.ActualProject.ProjectName);
            int result = pd.Run();
            if (result == (int)ResponseType.Ok) {
                MainClass.Workspace.SaveProject(MainClass.Workspace.ActualProject);
            }
            pd.Destroy();
        }