Beispiel #1
0
        private void C1TrueDBGridViewCommandStateQuery(
            object sender,
            CommandStateQueryEventArgs e)
        {
            DataViewEnum dv = (DataViewEnum)Enum.Parse(typeof(DataViewEnum), (string)((C1Command)sender).UserData);

            e.Pressed = _trueGridOptions.DataView == dv;
        }
Beispiel #2
0
        private void C1FlexGridViewCommandStateQuery(
            object sender,
            CommandStateQueryEventArgs e)
        {
            FlexViewModeEnum vm = (FlexViewModeEnum)Enum.Parse(typeof(FlexViewModeEnum), (string)((C1Command)sender).UserData);

            e.Pressed = _flexGridOptions.ViewMode == vm;
        }
Beispiel #3
0
        private void C1ScheduleViewCommandStateQuery(
            object sender,
            CommandStateQueryEventArgs e)
        {
            ScheduleViewEnum sv = (ScheduleViewEnum)Enum.Parse(typeof(ScheduleViewEnum), (string)((C1Command)sender).UserData);

            e.Pressed = _scheduleOptions.ViewType == sv;
        }
Beispiel #4
0
        private void FocusRectCommandStateQuery(
            object sender,
            CommandStateQueryEventArgs e)
        {
            FocusRectEnum fr = (FocusRectEnum)((C1Command)sender).UserData;

            e.Pressed = _flexGridOptions.FocusRect == fr;
        }
Beispiel #5
0
        private void SelectionModeCommandStateQuery(
            object sender,
            CommandStateQueryEventArgs e)
        {
            SelectionModeEnum sm = (SelectionModeEnum)((C1Command)sender).UserData;

            e.Pressed = _flexGridOptions.SelectionMode == sm;
        }
Beispiel #6
0
        /// <summary>
        /// Sets the 'pressed' state on the menu item corresponding to the current application theme.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void OnThemeCommandStateQuery(
            object sender,
            CommandStateQueryEventArgs e)
        {
            C1Command c = (C1Command)sender;

            e.Pressed = C1ThemeController.ApplicationTheme == (string)c.UserData;
        }