示例#1
0
        public void openHistory()
        {
            SelectedDebt = new ObservableCollection <double>();
            SelectedDebt = Debts[CurrentSelectedIndex].Amounts;
            var historyView = new HistoryWindow();

            historyView.Show();
        }
        private void HistoryAction()
        {
            var historyWindow    = new HistoryWindow();
            var historyViewModel = new HistoryViewModel(_logicClient);

            historyViewModel.OnRequestClose += (s, e) => historyWindow.Close();
            historyWindow.DataContext        = historyViewModel;
            historyWindow.Show();
        }
示例#3
0
 private void uiShowHistory_Click(object sender, EventArgs e)
 {
     if (_historyWindow == null)
     {
         _historyWindow           = new HistoryWindow(_programLogic.ProgressHistory);
         _historyWindow.Disposed += new EventHandler(_historyWindow_Disposed);
         _historyWindow.Show(this.FindForm());
     }
 }
示例#4
0
        private void History_click(object sender, RoutedEventArgs e)
        {
            HistoryWindow historyWindow = new HistoryWindow
            {
                Owner       = this,
                DataContext = this.DataContext
            };

            historyWindow.Show();
        }
示例#5
0
        private void Query_Click(object sender, RoutedEventArgs e)
        {
            HistoryWindow hw = new HistoryWindow(dal)
            {
                WindowStartupLocation = WindowStartupLocation.CenterScreen
            };

            hw.Show();
            hw.Activate();
        }
示例#6
0
        private void OnShowHistory(object obj)
        {
            if (historyWindow == null)
            {
                historyWindow             = new HistoryWindow();
                historyWindowViewModel    = new HistoryWindowViewModel();
                historyWindow.DataContext = historyWindowViewModel;
            }

            historyWindow.Show();
        }
示例#7
0
        private void MenuItemHistory_Click(object sender, RoutedEventArgs e)
        {
            MenuItem menu        = (MenuItem)sender;
            var      dataCOntext = menu.DataContext;
            var      v           = (KeyValuePair <long, ObservableCollection <FTN.ServiceContracts.MeasurementUI> >)dataCOntext;
            long     gid         = v.Key;

            HistoryWindow historyWindow = new HistoryWindow(gid, v.Value[0].Name);

            historyWindow.Show();
        }
示例#8
0
        private void ShowDetail(string custBar)
        {
            HistoryWindow hw = new HistoryWindow(dal)
            {
                WindowStartupLocation = WindowStartupLocation.CenterScreen
            };

            hw.custCode.Text = custBar;
            hw.Show();
            hw.Query();
            hw.Activate();
        }
示例#9
0
 private void OpenHistoryWindow_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     if (HistoryWindow == null)
     {
         HistoryWindow         = new HistoryWindow();
         HistoryWindow.Closed += (s, a) => HistoryWindow = null;
         HistoryWindow.Show();
     }
     else
     {
         HistoryWindow.Activate();
     }
 }
示例#10
0
 private void uiShowHistory_Click(object sender, EventArgs e)
 {
     if (_historyWindow == null)
     {
         _historyWindow           = new HistoryWindow(_programLogic.ProgressHistory);
         _historyWindow.Disposed += new EventHandler(_historyWindow_Disposed);
         Form containerForm = FindForm();
         _historyWindow.Show(containerForm);
         if (containerForm != null)
         {
             Screen scr = Screen.FromControl(containerForm);
             int    x   = Math.Min(containerForm.Right, scr.Bounds.Width
                                   - _historyWindow.Width);
             _historyWindow.Location =
                 new Point(x, containerForm.Top);
         }
     }
 }
示例#11
0
 internal void LaunchJobHistoryWindow()
 {
     if (!_isHistoryLaunched)
     {
         _jobHistoryWindow         = new HistoryWindow();
         _jobHistoryWindow.Closed += (s, e) => { _isHistoryLaunched = false; };
         _jobHistoryWindow.Show();
         _isHistoryLaunched = true;
     }
     else
     {
         if (_jobHistoryWindow.WindowState == WindowState.Minimized)
         {
             _jobHistoryWindow.WindowState = WindowState.Normal;
         }
         _jobHistoryWindow.Focus();
     }
 }
示例#12
0
        public override void startHistoryWindow()
        {
            HistoryWindow w = new HistoryWindow(device);

            w.Show();
        }
示例#13
0
        private void HistoryButton_Click(object sender, RoutedEventArgs e)
        {
            var historyWindow = new HistoryWindow(callback, editor.DocumentName);

            historyWindow.Show();
        }
示例#14
0
        private void history_btn_Click(object sender, RoutedEventArgs e)
        {
            HistoryWindow w = new HistoryWindow(CabInUI);

            w.Show();
        }
示例#15
0
 internal void LaunchJobHistoryWindow()
 {
     if (!_isHistoryLaunched)
     {
         _jobHistoryWindow = new HistoryWindow();
         _jobHistoryWindow.Closed += (s, e) => { _isHistoryLaunched = false; };
         _jobHistoryWindow.Show();
         _isHistoryLaunched = true;
     }
     else
     {
         if (_jobHistoryWindow.WindowState == WindowState.Minimized)
             _jobHistoryWindow.WindowState = WindowState.Normal;
         _jobHistoryWindow.Focus();
     }
 }
示例#16
0
        public virtual void startHistoryWindow()
        {
            HistoryWindow w = new HistoryWindow(this._device);

            w.Show();
        }
示例#17
0
        private static void OnFinishedHeaderGUI(UnityEditor.Editor editor)
        {
            if (editor.GetType() == typeof(MaterialEditor))
            {
                return;
            }
            if (!Container.GetLockSettings().IsEnabled)
            {
                return;
            }
            if (!Locker.HasFetched)
            {
                return;
            }
            if (!Locker.AreAssetTypesValid(editor.targets))
            {
                return;
            }

            var isLockedByMe          = Locker.AreAllAssetsLockedByMe(editor.targets);
            var isLockedBySomeoneElse = Locker.IsAnyAssetLockedBySomeoneElse(editor.targets);
            var isLockedNowButUnlockedAtLaterCommit = Locker.IsAnyAssetLockedNowButUnlockedAtLaterCommit(editor.targets);

            using (new GUILayout.HorizontalScope())
            {
                EditorGUILayout.LabelField("Lock", sm_lockLabelStyle, GUILayout.Width(44));
                using (new EditorGUI.DisabledGroupScope(isLockedByMe || isLockedBySomeoneElse || isLockedNowButUnlockedAtLaterCommit))
                {
                    if (GUILayout.Button(new GUIContent(Constants.LockName), EditorStyles.miniButton))
                    {
                        Locker.TryLockAssets(editor.targets, null, (errorMessage) =>
                        {
                            EditorUtility.DisplayDialog("Asset locking failed", "Asset locking failed\n" + errorMessage, "OK");
                        });
                    }
                }
                using (new EditorGUI.DisabledGroupScope(!isLockedByMe))
                {
                    if (GUILayout.Button(new GUIContent(Constants.RevertName), EditorStyles.miniButton))
                    {
                        Locker.TryRevertAssetLocks(editor.targets, null, (errorMessage) =>
                        {
                            EditorUtility.DisplayDialog("Asset reverting failed", "Asset reverting failed\n" + errorMessage, "OK");
                        });
                    }
                    if (GUILayout.Button(new GUIContent(Constants.FinishName), EditorStyles.miniButton))
                    {
                        Locker.TryFinishLockingAssets(editor.targets, null, (errorMessage) =>
                        {
                            EditorUtility.DisplayDialog("Asset finishing failed", "Asset finishing failed\n" + errorMessage, "OK");
                        });
                    }
                }
                if (GUILayout.Button(new GUIContent(Constants.HistoryName), EditorStyles.miniButton))
                {
                    HistoryWindow.Show(editor.target);
                }
            }

            if (isLockedByMe || isLockedBySomeoneElse || isLockedNowButUnlockedAtLaterCommit)
            {
                var hasMultipleLockers = false;
                var locker             = Locker.GetAssetLocker(editor.targets[0]);
                for (var i = 1; i < editor.targets.Length; i++)
                {
                    if (locker != Locker.GetAssetLocker(editor.targets[1]))
                    {
                        hasMultipleLockers = true;
                        break;
                    }
                }
                if (!string.IsNullOrEmpty(locker))
                {
                    LockDrawer.TryDrawLock(sm_headerRect, editor.target, LockDrawer.DrawType.LargeIcon);
                    EditorGUILayout.LabelField("Asset" + (editor.targets.Length > 1 ? "s" : "") + " locked by " + (hasMultipleLockers ? "multiple users" : locker), EditorStyles.boldLabel);
                    if (isLockedNowButUnlockedAtLaterCommit)
                    {
                        var hasMultipleUnlockShas = false;
                        var sha = Locker.GetAssetUnlockCommitShaShort(editor.targets[0]);
                        for (var i = 1; i < editor.targets.Length; i++)
                        {
                            if (sha != Locker.GetAssetUnlockCommitShaShort(editor.targets[1]))
                            {
                                hasMultipleUnlockShas = true;
                                break;
                            }
                        }
                        if (!string.IsNullOrEmpty(sha))
                        {
                            if (hasMultipleUnlockShas)
                            {
                                EditorGUILayout.LabelField("(Unlocked at multiple commits)");
                            }
                            else
                            {
                                EditorGUILayout.LabelField("(Unlocked at commit " + sha + ")");
                            }
                        }
                    }
                }
            }
        }
示例#18
0
 public static void ViewHistory()
 {
     HistoryWindow.Show(Selection.activeObject);
 }
 private static void AddLockItems(GenericMenu menu, UnityEngine.Object asset)
 {
     menu.AddSeparator("");
     AddSingleMenuItem(menu, asset, Locker.GetIsLockValid, new GUIContent(Constants.LockName), () => TryLockAssets(new UnityEngine.Object[] { asset }));
     AddSingleMenuItem(menu, asset, Locker.GetIsRevertLockValid, new GUIContent(Constants.RevertName), () => TryRevertAssets(new UnityEngine.Object[] { asset }));
     AddSingleMenuItem(menu, asset, Locker.GetIsFinishLockValid, new GUIContent(Constants.FinishName), () => TryFinishLockingAssets(new UnityEngine.Object[] { asset }));
     AddSingleMenuItem(menu, asset, Locker.IsAssetTypeValid, new GUIContent(Constants.HistoryName), () => HistoryWindow.Show(asset));
 }
示例#20
0
        protected void ShowContactLogExecuted(Interlocutor interlocutor)
        {
            var historyWindow = new HistoryWindow(interlocutor, _core.ModelContext);

            historyWindow.Show();
        }