Exemple #1
0
 private void LoadDatabaseButton_Click(object sender, EventArgs e)
 {
     m_eventInformation.databaseFileName = LoadDatabaseFileName.Text;
     if (!File.Exists(m_eventInformation.databaseFileName))
     {
         MessageBox.Show(m_eventInformation.databaseFileName + " does not exist!!!!");
         return;
     }
     PairsGeneral.loadPairsDatabaseInformation(m_eventInformation.databaseFileName, out m_databaseParameters);
     PairsGeneral.loadPairsEventInformation(m_databaseParameters, m_eventInformation.databaseFileName, out m_eventInformation);
     CW_RootFolder.Text = m_eventInformation.webpagesDirectory;
     ControlTabs.SelectTab("CreateWebpagesTab");
 }
 private void ResetControlTabs()
 {
     foreach (var tab in Instance.HiddenNetTabs)
     {
         Destroy(Instance.HeaderForTab(tab.Value)?.gameObject);
         Destroy(tab.Value.gameObject);
     }
     foreach (var tab in Instance.OpenedNetTabs)
     {
         Destroy(Instance.HeaderForTab(tab.Value)?.gameObject);
         Destroy(tab.Value.gameObject);
     }
     Instance.SelectTab(ClientTabType.Stats, false);
 }
Exemple #3
0
    void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }
        else
        {
            Destroy(gameObject);
            //Killing net tabs on round restart
//				Logger.LogError( "ControlTabs cleanup!" );
            foreach (var tab in Instance.HiddenNetTabs)
            {
                Destroy(Instance.HeaderForTab(tab.Value)?.gameObject);
                Destroy(tab.Value.gameObject);
            }
            foreach (var tab in Instance.OpenedNetTabs)
            {
                Destroy(Instance.HeaderForTab(tab.Value)?.gameObject);
                Destroy(tab.Value.gameObject);
            }
            Instance.SelectTab(ClientTabType.Stats, false);
        }
    }
        private void checkCredentials_Button_Click(object sender, EventArgs e)
        {
            String username = this.userName_Textbox.Text;
            String password = this.password_Textbox.Text;
            String scope    = "http://www.google.com/calendar/feeds/[email protected]/private/full";

            this.checkCredentials_Status_Textbox.Clear();
            TextBoxTraceListener _textBoxListener = new TextBoxTraceListener(this.checkCredentials_Status_Textbox);

            Trace.Listeners.Add(_textBoxListener);
            Tuple <Boolean, Boolean> check = CalendarAPI.checkCredentials(scope: scope, username: username, password: password);
            String  message = "";
            Boolean proceed = true;

            if (!check.Item1)
            {
                message += "Invalid Username and Password!!!";
                proceed  = false;
            }
            else
            {
                if (!check.Item2)
                {
                    message += "You do not have authorization to edit Indian Bridge Calendar!!!\n";
                    proceed  = false;
                }
                String sitesUrl = "https://sites.google.com/feeds/content/site/" + this.googleSiteRoot_Textbox.Text;
                if (SitesAPI.checkCredentials(url: sitesUrl, username: username, password: password))
                {
                    message = "You are authorized to publish results!!!\nPlease Click OK to continue";
                    proceed = true;
                }
                else
                {
                    message += "You do not have authorization to edit Website!!!";
                    proceed  = false;
                }
                Trace.Listeners.Remove(_textBoxListener);
            }
            MessageBox.Show(message);
            if (proceed)
            {
                ControlTabs.SelectTab("SelectEventTab");
            }
        }
Exemple #5
0
 private void FillComboBoxes()
 {
     ColorSelection.UseCustomBackColor = false;
     ControlTabs.SelectTab(0);
     RefreshComPorts();
     foreach (InterpolationMode interpmode in Enum.GetValues(typeof(InterpolationMode)))
     {
         if (interpmode != InterpolationMode.Invalid)
         {
             InterpMode.Items.Add(interpmode);                                                                                                                          //fetch all possible interpolation modes
         }
     }
     foreach (MMDevice dev in new MMDeviceEnumerator().EnumerateAudioEndPoints(DataFlow.All, DeviceState.Active))
     {
         AudioInputs.Items.Add(dev);
     }
     for (int i = 0; i < BaudRatesList.Length; i++)
     {
         BaudRate.Items.Add(BaudRatesList[i]);
     }
     CaptureArea.Items.Add("Fullscreen");
     CaptureArea.Items.Add("Custom resolution");
     CaptureArea.Items.Add("Custom offsets");
     AmbilightModes.Items.Add("Dynamic Ambilight");
     AmbilightModes.Items.Add("Rainbow");
     AmbilightModes.Items.Add("Single Color");
     AmbilightModes.Items.Add("Single Color Fade");
     AmbilightModes.Items.Add("Multicolor Fade");
     AmbilightModes.Items.Add("Multicolor Wipe");
     AmbilightModes.Items.Add("Running Dot");
     AmbilightModes.Items.Add("Cylon Bounce");
     AmbilightModes.Items.Add("Theater Chase");
     AmbilightModes.Items.Add("Happy New Year");
     AmbilightModes.Items.Add("Sparkle");
     AmbilightModes.Items.Add("Twinkle");
     AmbilightModes.Items.Add("Bouncing Ball");
     AmbilightModes.Items.Add("Single Color VU Meter");
     AmbilightModes.Items.Add("Multicolor VU Meter");
     AmbilightModes.Items.Add("Fade VU Meter");
     foreach (SharpDX.DXGI.Adapter adapters in new SharpDX.DXGI.Factory1().Adapters)
     {
         CapturedDevice.Items.Add(adapters.Description.Description);
     }
 }
Exemple #6
0
        private void loadSummaryIntoDatabase()
        {
            PairsSummaryToDatabase std = new PairsSummaryToDatabase(m_eventInformation);
            TextBoxTraceListener   _textBoxListener = new TextBoxTraceListener(CD_Status);

            Trace.Listeners.Add(_textBoxListener);
            try
            {
                std.loadSummaryIntoDatabase();
                m_databaseParameters = std.getDatabaseParameters();
                Trace.Listeners.Remove(_textBoxListener);
                CW_RootFolder.Text = m_eventInformation.webpagesDirectory;
                ControlTabs.SelectTab("CreateWebpagesTab");
            }
            catch (Exception e)
            {
                Trace.Listeners.Remove(_textBoxListener);
                throw e;
            }
        }
Exemple #7
0
 private void CW_CreateButton_Click(object sender, EventArgs e)
 {
     m_eventInformation.webpagesDirectory = CW_RootFolder.Text;
     if (Directory.Exists(m_eventInformation.webpagesDirectory))
     {
         DialogResult result = MessageBox.Show(m_eventInformation.webpagesDirectory + " exists!!!\nShould the contents be overwritten?", "Overwrite?", MessageBoxButtons.OKCancel);
         if (result == DialogResult.OK)
         {
             createWebpages();
         }
     }
     else
     {
         DialogResult result = MessageBox.Show(m_eventInformation.databaseFileName + " does not exist!!!\nShould a new folder be created?", "Create?", MessageBoxButtons.OKCancel);
         if (result == DialogResult.OK)
         {
             Directory.CreateDirectory(m_eventInformation.webpagesDirectory);
             createWebpages();
         }
     }
     UW_webpagesDirectory.Text = m_eventInformation.webpagesDirectory;
     ControlTabs.SelectTab("UploadWebpagesTab");
 }
Exemple #8
0
 private void createDatabaseTab()
 {
     CD_DatabaseFileName.Text = m_eventInformation.databaseFileName;
     ControlTabs.SelectTab("CreateDatabaseTab");
 }