示例#1
0
        public void GenericSingleParameterMessage(Object o, AppDelegateType a)
        {
            if (InvokeRequired)
            {
                Invoke(new GenericSingleParameterMessageDelegate(GenericSingleParameterMessage), o, a);
                return;
            }

            switch (a)
            {
            case AppDelegateType.AddEventToLog:
                Program.CommandersLog.SaveEvent((CommandersLogEvent)o);
                break;

            case AppDelegateType.MaximizeWindow:
                _parent.WindowState = FormWindowState.Minimized;
                Show();
                _parent.WindowState = FormWindowState.Normal;
                break;

            default:
                throw new NotImplementedException();
            }
        }
示例#2
0
        public void GenericSingleParameterMessage(Object o, AppDelegateType a)
        {
            if (InvokeRequired)
            {
                Invoke(new GenericSingleParameterMessageDelegate(GenericSingleParameterMessage), o, a);
                return;
            }

            switch (a)
            {
                case AppDelegateType.AddEventToLog:
                    Program.CommandersLog.SaveEvent((CommandersLogEvent)o);
                    break;
                case AppDelegateType.MaximizeWindow:
                    _parent.WindowState = FormWindowState.Minimized;
                    Show();
                    _parent.WindowState = FormWindowState.Normal;
                    break;
                default:
                    throw new NotImplementedException();
            }
        }
示例#3
0
        public void GenericSingleParameterMessage(Object o, AppDelegateType a)
        {
            if (InvokeRequired)
            {
                Invoke(new GenericSingleParameterMessageDelegate(GenericSingleParameterMessage), o, a);
                return;
            }

            switch (a)
            {
                case AppDelegateType.AddEventToLog:
                    CommandersLog.CreateEvent((CommandersLogEvent)o);
                    CommandersLog.SaveLog(true);
                    break;
                case AppDelegateType.ChangeGridSort:
                    ChangeGridSort((string)o);
                    break;
                case AppDelegateType.MaximizeWindow:
                    WindowState = FormWindowState.Minimized;
                    Show();
                    WindowState = FormWindowState.Normal;
                    break;
                default:
                    throw new NotImplementedException();
            }
        }