示例#1
0
 public MainMenu(string i_MenuTitle, string i_MenuMessage)
 {
     this.m_MenuOptionsList    = new List <MenuItem>();
     this.m_MenuTitle          = i_MenuTitle;
     this.m_MenuMessage        = i_MenuMessage;
     this.m_PreviousMenuOption = null;
 }
        private void OnShowMenu(ShowMenu msg)
        {
            if (msg.ShowTitle)
            {
                Console.ForegroundColor = ConsoleColor.Cyan;
                Console.WriteLine(msg.ApplicationName);
                Console.ResetColor();
                Console.WriteLine();
            }

            Console.ForegroundColor = ConsoleColor.Green;
            Console.Write(msg.OwnerName);
            Console.ResetColor();
            Console.WriteLine(", please tell me what you want to do:");
            foreach (KeyValuePair <int, string> choiceItem in Choices.List)
            {
                Console.WriteLine("{0} - {1}", choiceItem.Key, choiceItem.Value);
            }

            Console.WriteLine();
            Console.ForegroundColor = ConsoleColor.Blue;
            Console.Write("Make your choice: ");
            Console.ResetColor();

            Context.Parent.Tell(new ShowMenuShowMessageBeforeCompleted());
        }
示例#3
0
        private void ShowActionMenu(ShowMenu menu)
        {
            if (menu == ShowMenu.Install)
            {
                wcReconnect.Visibility = Visibility.Collapsed;

                actionMain.Visibility      = Visibility.Collapsed;
                actionInstall.Visibility   = Visibility.Visible;
                actionUninstall.Visibility = Visibility.Collapsed;

                CommandOutput_Reset();
                CommandOutput_Insert($"File APK : {Path.GetFileName(apk.FilePath)}");

                gbTarget.IsEnabled   = false;
                gbAction.Header      = "Action : Install";
                gbCommand.Visibility = Visibility.Visible;
                StartActionInstallMenu(true);

                if (!cfg.AutoInstall())
                {
                    return;
                }
                ButtonActionInstall_Click(null, null);
            }
            else if (menu == ShowMenu.Uninstall)
            {
                wcReconnect.Visibility = Visibility.Collapsed;

                actionMain.Visibility      = Visibility.Collapsed;
                actionInstall.Visibility   = Visibility.Collapsed;
                actionUninstall.Visibility = Visibility.Visible;

                CommandOutput_Reset();
                CommandOutput_Insert($"Package : {apk.PackageName}");

                gbTarget.IsEnabled   = false;
                gbAction.Header      = "Action : Uninstall";
                gbCommand.Visibility = Visibility.Visible;

                if (!cfg.AutoUninstall())
                {
                    return;
                }
                ButtonActionUninstall_Click(null, null);
            }
            else
            {
                wcReconnect.Visibility = Visibility.Visible;

                actionMain.Visibility      = Visibility.Visible;
                actionInstall.Visibility   = Visibility.Collapsed;
                actionUninstall.Visibility = Visibility.Collapsed;

                gbTarget.IsEnabled   = true;
                gbAction.Header      = "Select Action";
                gbCommand.Visibility = Visibility.Collapsed;
            }
        }
示例#4
0
        public MainPage()
        {
            this.InitializeComponent();

            ShowSplashPanel.Begin();
            ShowLogo.Begin();
            ShowMenu.Begin();

            playSound("onTrans01.wav", false);
        }
示例#5
0
        static void Main(string[] args)
        {
            ProgressBar.Show();
            ShowMenu show = new ShowMenu();

            show.Start();

            LoginPg lgn = new LoginPg();

            lgn.Registration();
        }
示例#6
0
 private void Btn_Menu_Tapped(object sender, TappedRoutedEventArgs e)
 {
     BtN_Menu.Source      = new BitmapImage(new Uri("ms-appx:///Assets/option1.png", UriKind.Absolute));
     menu.Visibility      = Visibility.Visible;
     LeftPanel.Visibility = Visibility.Visible;
     brd.Visibility       = Visibility.Visible;
     ShowMenu.Begin();
     Showbrd.Begin();
     HideMenuBtn.Begin();
     OpenRotateBtnMenu.Begin();
     BtN_Menu.Visibility = Visibility.Collapsed;
 }
示例#7
0
        private void _grid_MouseClick(object sender, MouseEventArgs e)
        {
            if ((e.Button & MouseButtons.Right) == MouseButtons.Right)
            {
                var row = GetRow(e.Location);

                Scope scope;

                if (row?.Tag is IExternalInteractor)
                {
                    scope = Scope.ExternalInteractor;
                }
                else if (row?.Tag is IProcess)
                {
                    scope = Scope.Process;
                }
                else if (row?.Tag is IDataStore)
                {
                    scope = Scope.DataStore;
                }
                else if (row?.Tag is IDataFlow)
                {
                    scope = Scope.DataFlow;
                }
                else if (row?.Tag is ITrustBoundary)
                {
                    scope = Scope.TrustBoundary;
                }
                else if (row?.Tag is IThreatModel)
                {
                    scope = Scope.ThreatModel;
                }
                else if (row?.Tag is IThreatEvent)
                {
                    scope = Scope.ThreatEvent;
                }
                else if (row?.Tag is IDiagram)
                {
                    scope = Scope.Diagram;
                }
                else
                {
                    scope = Scope.Undefined;
                }

                if (scope != Scope.Undefined)
                {
                    ShowMenu?.Invoke(row, _grid.PointToScreen(e.Location), scope);
                }
            }
        }
    // Use this for initialization
    void Start()
    {
        PlayerPrefs.SetFloat("MoveSpeed", 0f);
        PlayerPrefs.SetFloat("MoveSens", 0f);
        PlayerPrefs.SetFloat("RotSens", 0f);

        m_MenuData = menu.GetComponent <ShowMenu>();

        // Capture Trigger Held Event
        m_Device                 = GetComponent <SteamVR_TrackedController>();
        m_Device.TriggerHeld    += OnTriggerHeld;
        m_Device.TriggerClicked += OnTriggerClick;


        m_AdvSettings = new AdvancedSettings();
    }
示例#9
0
    private void Start()
    {
        m_DeviceRight = GetComponent <SteamVR_TrackedController>();
        m_MenuData    = calibrationMenu.GetComponent <ShowMenu>();
        if (m_MenuData == null)
        {
            m_MenuData = GameObject.FindGameObjectWithTag("SettingsMenu").GetComponent <ShowMenu>();
        }

        if (m_DeviceRight != null)
        {
            m_DeviceRight.Gripped          += OnGripPress;
            m_DeviceRight.Ungripped        += OnGripUnPress;
            m_DeviceRight.PadTouched       += OnPadTouched;
            m_DeviceRight.PadUntouched     += OnPadUnTouch;
            m_DeviceRight.TriggerHeld      += OnTriggerPressed;
            m_DeviceRight.TriggerUnclicked += OnTriggerUnPress;
        }
    }
示例#10
0
        public MainView()
        {
            InitializeComponent();
            DataContext = _viewmodel;

            Loaded += (sender, args) =>
            {
                if (_viewmodel.SettingsTabViewModel.ShowWelcomeTabOnStart)
                {
                    _viewmodel.ShowTab(_viewmodel.WelcomeTabViewModel);
                }
            };

            _viewmodel.ChartTabViewModels.CollectionChanged += ChartTabsCollectionChanged;
            var tabViewSource = CollectionViewSource.GetDefaultView(TabControl.Items);

            tabViewSource.CollectionChanged += (sender, args) =>
            {
                if (args.Action == NotifyCollectionChangedAction.Add)
                {
                    TabControl.SelectedIndex = _viewmodel.Tabs.Count - 1;
                }
            };

            _menuItemBottomMargin = (Thickness)ShowMenu.FindResource("MenuItemBottomMargin");

            _viewmodel.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == nameof(_viewmodel.TabToSelect))
                {
                    if (TabControl.SelectedItem == _viewmodel.TabToSelect)
                    {
                        BringCurrentTabIntoView();
                    }
                    else
                    {
                        TabControl.SelectedItem = _viewmodel.TabToSelect;
                    }
                }
            };
        }
    // Use this for initialization
    void Start()
    {
        m_Controller                   = GetComponent <SteamVR_TrackedController>();
        m_Controller.TriggerHeld      += OnTriggerHeld;
        m_Controller.TriggerClicked   += OnTriggerHeld;
        m_Controller.TriggerUnclicked += OnTriggerRelease;

        m_ButtonImage            = button.GetComponent <Image>();
        m_ButtonImage.fillMethod = Image.FillMethod.Horizontal;
        m_ButtonImage.fillAmount = 0f;
        m_Timer    = 0f;
        m_MenuData = calibrationMenu.GetComponent <ShowMenu>();

        if (!Directory.Exists(PATH))
        {
            DebugLogger.Log("[VRButtonHandler] :: Requested directory does not exist; Creating it\r\n");
            Directory.CreateDirectory(PATH);
        }

        DebugLogger.Log("[VRButtonHandler] :: All components succesfully initialized\r\n");
    }
示例#12
0
        public MainView()
        {
            InitializeComponent();
            DataContext = _viewmodel;
            Loaded     += (sender, args) =>
            {
                if (_viewmodel.SettingsTabViewModel.ShowWelcomeTabOnStart)
                {
                    _viewmodel.ShowTab(_viewmodel.WelcomeTabViewModel);
                }
            };
            _menuItemBottomMargin = (Thickness)ShowMenu.FindResource("MenuItemBottomMargin");

            _viewmodel.PartialUtilityTabViewModels.CollectionChanged += PartialUtilityTabsCollectionChanged;

            var tabViewSource = CollectionViewSource.GetDefaultView(TabControl.Items);

            tabViewSource.CollectionChanged += (sender, args) =>
            {
                if (args.Action == NotifyCollectionChangedAction.Add)
                {
                    TabControl.SelectedIndex = _viewmodel.Tabs.Count - 1;
                }
            };

            _viewmodel.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName == nameof(_viewmodel.TabToSelect))
                {
                    if (TabControl.SelectedItem == _viewmodel.TabToSelect)
                    {
                        BringCurrentTabIntoView();
                    }
                    else
                    {
                        TabControl.SelectedItem = _viewmodel.TabToSelect;
                    }
                }
                else if (e.PropertyName == nameof(_viewmodel.CoefficientAssessmentTabViewModel))
                {
                    CoefficientAssessmentTabPropertyChanged();
                }
            };

            _viewmodel.Results.PropertyChanged += (s, e) =>
            {
                if (e.PropertyName != nameof(_viewmodel.Results.K))
                {
                    return;
                }
                if (_viewmodel.Results.K.HasValue)
                {
                    var width    = ((GridLength)MainViewGrid.FindResource("RightPanelWidth")).Value;
                    var minWidth = (double)MainViewGrid.FindResource("RightPanelMinWidth");
                    MainViewGrid.ColumnDefinitions[4].Width    = new GridLength(width);
                    MainViewGrid.ColumnDefinitions[4].MinWidth = minWidth;
                    TabsResultsGridSplitter.Visibility         = Visibility.Visible;
                    ResultsPanelMenuItem.IsChecked             = true;
                }
                else
                {
                    MainViewGrid.ColumnDefinitions[4].MinWidth = 0;
                    MainViewGrid.ColumnDefinitions[4].Width    = new GridLength(0);
                    TabsResultsGridSplitter.Visibility         = Visibility.Collapsed;
                    ResultsPanelMenuItem.IsChecked             = false;
                }
            };
        }
示例#13
0
 void Awake()
 {
     ShowMenu = GetComponent <ShowMenu>();
     Audio    = GetComponent <AudioSource>();
 }
示例#14
0
 private void Start()
 {
     m_Menu = CalibrationMenu.GetComponent <ShowMenu>();
 }
示例#15
0
 public void setPreviousMenu(ShowMenu i_PreviousMenu)
 {
     this.m_PreviousMenuOption = i_PreviousMenu;
 }
示例#16
0
        private void OnShowMenu(ShowMenu msg)
        {
            Become(Menu);

            _outputActor.Tell(msg);
        }
示例#17
0
        protected override void RenderContents(System.Web.UI.HtmlTextWriter writer)
        {
            if (this.DesignMode)
            {
                //nothing to be done yet
            }
            else
            {
                WriteParam(writer, "movie", ResolveClientUrl(MovieUrl));
                // choose a wmode and a bgcolor based on BackColor value.
                if (BackColor == System.Drawing.Color.Transparent)
                {
                    WriteParam(writer, "wmode", "Transparent");
                }
                else if (BackColor.Equals(System.Drawing.Color.Empty))
                {
                    //nothing to be done.
                }
                else
                {
                    //Conversion.Hex
                    string color = this.BackColor.ToArgb().ToString("x2");
                    if (!color.Equals("0"))
                    {
                        WriteParam(writer, "bgcolor", "#" + color.Substring(2));
                    }
                }

                WriteParam(writer, "menu", ShowMenu.ToString().ToLower());

                if (!string.IsNullOrEmpty(FlashVars))
                {
                    WriteParam(writer, "flashVars", FlashVars);
                }

                if (this.Scale != FlashScale.ShowAll)
                {
                    WriteParam(writer, "scale", Scale.ToString().ToLower());
                }

                if (!Play)
                {
                    WriteParam(writer, "play", "false");
                }
                if (ScriptAccess != FlashScriptAccess.Default)
                {
                    WriteParam(writer, "allowScriptAccess", ScriptAccess.ToString().ToLower());
                }
                if (AllowFullScreen)
                {
                    WriteParam(writer, "allowFullscreen", AllowFullScreen.ToString().ToLower());
                }

                if (!@Loop)
                {
                    WriteParam(writer, "loop", "false");
                }

                WriteParam(writer, "quality", Quality.ToString().ToLower());

                if (this.Alignment != FlashAlign.Center)
                {
                    string align = "";
                    switch (Alignment)
                    {
                    case FlashAlign.Bottom:
                        align = "b";
                        break;

                    case FlashAlign.BottomLeft:
                        align = "bl";
                        break;

                    case FlashAlign.BottomRight:
                        align = "br";
                        break;

                    case FlashAlign.Left:
                        align = "l";
                        break;

                    case FlashAlign.Right:
                        align = "r";
                        break;

                    case FlashAlign.Top:
                        align = "t";
                        break;

                    case FlashAlign.TopLeft:
                        align = "tl";
                        break;

                    case FlashAlign.TopRight:
                        align = "tr";
                        break;
                    }
                    WriteParam(writer, "salign", align);
                }

                if (!Unit.Equals(ExpandedWidth, Unit.Empty))
                {
                    writer.AddAttribute("width", this.ExpandedWidth.ToString());
                }
                else
                {
                    writer.AddAttribute("width", this.Width.ToString());
                }
                if (!Unit.Equals(ExpandedHeight, Unit.Empty))
                {
                    writer.AddAttribute("height", this.ExpandedHeight.ToString());
                }
                else
                {
                    writer.AddAttribute("height", this.Height.ToString());
                }


                writer.AddAttribute(HtmlTextWriterAttribute.Type, "application/x-shockwave-flash");
                writer.AddAttribute("pluginspage", "http://www.macromedia.com/go/getflashplayer");
                writer.RenderBeginTag(HtmlTextWriterTag.Embed);
                writer.RenderEndTag();
            }
        }