Example #1
0
        /// <summary>
        ///   OK
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonOk_Click(object sender, EventArgs e)
        {
            try
              {
            // Assembly Data for Tracking
            var m_a = new AssemblyInfo(Assembly.GetExecutingAssembly());

            // Usage Tracking
            ////         var m_usage = new clsUsageFree("spicey", m_a);
              }
              catch (Exception exception)
              {
            Debug.WriteLine(exception.Message);
              }

              // Progress Bar
              buttonOk.Hide();
              buttonCancel.Hide();
              ButtonHelp.Hide();
              progressBar1.Show();
              progressBar1.Minimum = 0;
              progressBar1.Maximum = 1;
              progressBar1.Value = 0;
              ProcessData();
        }
Example #2
0
        /// <summary>
        /// OK
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonOk_Click(object sender, EventArgs e)
        {
            try
              {

            // Assembly Data for Tracking
            AssemblyInfo m_a = new AssemblyInfo(Assembly.GetExecutingAssembly());

              }
              catch { }

              // Progress Bar
              this.buttonOk.Hide();
              this.buttonCancel.Hide();
              this.progressBar1.Show();
              this.progressBar1.Minimum = 0;
              this.progressBar1.Maximum = _s.Views.Count;
              this.progressBar1.Value = 0;
              ProcessData();
        }
Example #3
0
        /// <summary>
        /// Record
        /// </summary>
        /// <param name="useProxy"></param>
        /// <remarks></remarks>
        public static void RecordUsage(bool useProxy = false)
        {
            // Ignore My Calls
              if (Environment.MachineName.ToLower() == "case-platinum" & Environment.UserName.ToLower() == "d.rudder") return;
              if (Environment.MachineName.ToLower() == "masterdonpc" & Environment.UserName.ToLower() == "masterdon") return;

              try
              {

            // Assembly Data for Tracking
            AssemblyInfo m_a = new AssemblyInfo(Assembly.GetExecutingAssembly());

            string m_url = GetHeader() + "logusage?ip=" + GetPublicIp();
            m_url += "&mac=" + GetFullDomainName();
            m_url += "&netb=" + Environment.MachineName;
            m_url += "&appn=" + m_a.Title;
            m_url += "&appv=" + m_a.Version.ToString();
            m_url += "&appf=" + "report";
            m_url += "&user="******"&mn=" + "";

            // The Request Call
            HttpWebRequest m_req = (HttpWebRequest)HttpWebRequest.Create(m_url);
            m_req.Credentials = GetCred();
            m_req.Method = "POST";
            if (useProxy == false) m_req.Proxy = null;

            // Response String
            m_req.GetResponse();

              }
              catch
              {

            try
            {
              if (useProxy == false) RecordUsage(true);
            }
            catch { }
              }
        }
Example #4
0
        /// <summary>
        ///   OK
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonOk_Click(object sender, EventArgs e)
        {
            try
              {
            // Usage Tracking
            AssemblyInfo m_a = new AssemblyInfo(Assembly.GetExecutingAssembly());
              }
              catch
              {
              }

              int m_total = _s.Dimensions.Count;

              // Progress Bar
              buttonOk.Hide();
              buttonCancel.Hide();
              progressBar1.Show();
              progressBar1.Minimum = 0;
              progressBar1.Maximum = m_total;
              progressBar1.Value = 0;

              using (Transaction m_t = new Transaction(_s.ActiveDoc, "Adjust Dimensions"))
              {
            m_t.Start();
            try
            {
              if (!btn_ClearOverrides.Checked)
              {
            foreach (Dimension m_dimension in _s.Dimensions)
            {
              if (!m_dimension.Segments.IsEmpty)
              {
                foreach (DimensionSegment m_dim in m_dimension.Segments)
                {
                  if (!string.IsNullOrEmpty(txt_TopOverride.Text))
                  {
                    m_dim.Above = txt_TopOverride.Text;
                  }
                  if (!string.IsNullOrEmpty(txt_BottomOverride.Text))
                  {
                    m_dim.Below = txt_BottomOverride.Text;
                  }
                  if (!string.IsNullOrEmpty(txt_LeftOverride.Text))
                  {
                    m_dim.Prefix = txt_LeftOverride.Text;
                  }
                  if (!string.IsNullOrEmpty(txt_RightOverride.Text))
                  {
                    m_dim.Suffix = txt_RightOverride.Text;
                  }
                  if (!string.IsNullOrEmpty(txt_DimOverride.Text))
                  {
                    m_dim.ValueOverride = txt_DimOverride.Text;
                  }
                  if (btn_ResetPosition.Checked)
                  {
                    m_dim.ResetTextPosition();
                  }
                }
              }
              else
              {
                if (btn_ResetPosition.Checked)
                {
                  m_dimension.ResetTextPosition();
                }
                if (!string.IsNullOrEmpty(txt_TopOverride.Text))
                {
                  m_dimension.Above = txt_TopOverride.Text;
                }
                if (!string.IsNullOrEmpty(txt_BottomOverride.Text))
                {
                  m_dimension.Below = txt_BottomOverride.Text;
                }
                if (!string.IsNullOrEmpty(txt_LeftOverride.Text))
                {
                  m_dimension.Prefix = txt_LeftOverride.Text;
                }
                if (!string.IsNullOrEmpty(txt_RightOverride.Text))
                {
                  m_dimension.Suffix = txt_RightOverride.Text;
                }
                if (!string.IsNullOrEmpty(txt_DimOverride.Text))
                {
                  m_dimension.ValueOverride = txt_DimOverride.Text;
                }
              }
            }
              }
              else
              {
            foreach (Dimension m_dimension in _s.Dimensions)
            {
              if (!m_dimension.Segments.IsEmpty)
              {
                foreach (DimensionSegment m_segment in m_dimension.Segments)
                {
                  m_segment.Above = null;
                  m_segment.Below = null;
                  m_segment.Prefix = null;
                  m_segment.Suffix = null;
                  m_segment.ValueOverride = null;
                }
              }
              else
              {
                m_dimension.Above = null;
                m_dimension.Below = null;
                m_dimension.Prefix = null;
                m_dimension.Suffix = null;
                m_dimension.ValueOverride = null;
              }
            }
              }
              progressBar1.Increment(1);
            }
            catch (Exception)
            {
              m_t.RollBack();
              throw;
            }
            m_t.Commit();
              }
              Close();
        }
Example #5
0
        /// <summary>
        ///   OK
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonOk_Click(object sender, EventArgs e)
        {
            try
              {
            // Assembly Data for Tracking
            var m_a = new AssemblyInfo(Assembly.GetExecutingAssembly());

            // Usage Tracking
            ////         var m_usage = new clsUsageFree("spicey", m_a);
              }
              catch (Exception exception)
              {
            Debug.WriteLine(exception.Message);
              }

              // Progress Bar Shuffle
              buttonOk.Hide();
              buttonCancel.Hide();
              ButtonHelp.Hide();

              _fList = _s.FamiliesToProcess(FolderPath, CheckSubFolders.Checked);

              progressBar1.Show();
              progressBar1.Minimum = 0;
              progressBar1.Value = 0;
              progressBar1.Maximum = _fList.Count;
              groupBox2.Hide();
              label1.Show();
              FormBorderStyle = FormBorderStyle.None;
              SizeGripStyle = SizeGripStyle.Hide;
              MinimumSize = new Size(400, 80);
              Size = new Size(400, 80);

              if (LastChanceExit())
              {
            ProcessData();
              }

              Close();
        }
Example #6
0
        /// <summary>
        /// OK
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonOk_Click(object sender, EventArgs e)
        {
            try
              {
            // Usage Tracking
            AssemblyInfo m_a = new AssemblyInfo(Assembly.GetExecutingAssembly());
              }
              catch { }

              int m_total = 0;
              if (checkBoxGroupsDetail.Checked)
            m_total += _s.DetailGroups.Count;
              if (checkBoxGroupsModel.Checked)
            m_total += _s.ModelGroups.Count;

              // Progress Bar
              buttonOk.Hide();
              buttonCancel.Hide();
              progressBar1.Show();
              progressBar1.Minimum = 0;
              progressBar1.Maximum = m_total;
              progressBar1.Value = 0;

              int m_sicM = 0;
              int m_sicD = 0;

              using (Transaction t = new Transaction(_s.ActiveDoc))
              {
            if (t.Start("Ungrouping All Groups") == TransactionStatus.Started)
            {
              if (checkBoxGroupsDetail.Checked)
              {
            foreach (var x in _s.DetailGroups)
            {
              try
              {
                x.UngroupMembers();
                progressBar1.Increment(1);
                m_sicD++;
              }
              catch {}
            }
              }
              if (checkBoxGroupsModel.Checked)
              {
            foreach (var x in _s.ModelGroups)
            {
              try
              {
                x.UngroupMembers();
                progressBar1.Increment(1);
                m_sicM++;
              }
              catch { }
            }
              }
              t.Commit();

            }
              }

              if (m_sicM + m_sicD < 1)
              {
            using (TaskDialog td = new TaskDialog("Failed"))
            {
              td.TitleAutoPrefix = false;
              td.MainInstruction = "Ungrouping Groups Failed";
              td.Show();
            }
              }
              else
              {
            string m_msg = string.Format("{0} of {1} Model Groups Ungrouped\n{2} of {3} Detail Groups Ungrouped",
            m_sicM, _s.ModelGroups.Count, m_sicD, _s.DetailGroups.Count);

            using (TaskDialog td = new TaskDialog("Results"))
            {
              td.TitleAutoPrefix = false;
              td.MainInstruction = "Ungrouping Results:";
              td.MainContent = m_msg;
              td.Show();
            }
              }

              Close();
        }
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     DataContext = new AssemblyInfo(System.Reflection.Assembly.GetExecutingAssembly());
 }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            panelSoundEngine.DataContext = App.SoundEngine;
            groupBoxSoundEngineSettings.DataContext = App.SoundEngine;
            groupBoxDisplayInputSettings.DataContext = App.DisplayInput;
            listBoxSoundPacks.ItemsSource = App.SoundPacks;
            comboBoxDisplayPosition.ItemsSource = Enum.GetValues(typeof(DisplayInputWindow.Position));

            var assembly_info = new AssemblyInfo(Assembly.GetExecutingAssembly());
            {
                tabItemAbout.DataContext = assembly_info;

                if (ApplicationDeployment.IsNetworkDeployed)
                {
                    var v = ApplicationDeployment.CurrentDeployment.CurrentVersion;
                    textBlockVersion.Text = string.Format(
                        "オンラインインストールバージョン {0}.{1}.{2}.{3}",
                        v.Major, v.Minor, v.Build, v.Revision);
                }
                else
                {
                    var v = assembly_info.Version;
                    textBlockVersion.Text = string.Format(
                        "オフラインインストールバージョン {0}.x 系統",
                        v.Major, v.Minor, v.Build, v.Revision);
                }
            }

            GlobalKeybordMonitor.KeyDown += (_sender, _e) => { Title = _e.KeyData.ToString(); };
        }
Example #9
0
        /// <summary>
        /// user clicks the send button
        /// prompts for a save locatio 
        /// creates a background worker to update the progressbar and package the issues
        /// </summary>
        private void send_Click(object sender, RoutedEventArgs e)
        {
            try
            {

                // Assembly Data for Tracking
                AssemblyInfo m_a = new AssemblyInfo(Assembly.GetExecutingAssembly());

            }
            catch { }

            try
            {

                if (all.IsChecked.Value)
                    _elemCheck = 0;
                else if (selected.IsChecked.Value)
                    _elemCheck = 1;

                // Configure save file dialog box
                Microsoft.Win32.SaveFileDialog saveFileDialog = new Microsoft.Win32.SaveFileDialog();
                saveFileDialog.Title = "Save as BCF report file...";
                saveFileDialog.DefaultExt = ".bcfzip"; // Default file extension
                saveFileDialog.Filter = "BIM Collaboration Format (*.bcfzip)|*.bcfzip"; // Filter files by extension

                // Show save file dialog box
                Nullable<bool> result = saveFileDialog.ShowDialog();

                // Process save file dialog box results
                if (result == true && saveFileDialog.FileName != "")
                {
                    _zipFileName = saveFileDialog.FileName;
                    if (File.Exists(_zipFileName))
                        File.Delete(_zipFileName);
                    //to avoid double clicks
                    mainwin.IsEnabled = false;
                    progress.Visibility = System.Visibility.Visible;
                    progress.Value = 0;
                    progress.IsIndeterminate = false;
                    BackgroundWorker worker = new BackgroundWorker();
                    worker.WorkerReportsProgress = true;
                    worker.DoWork += new DoWorkEventHandler(worker_DoWork);
                    worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(worker_RunWorkerCompleted);
                    worker.ProgressChanged += new ProgressChangedEventHandler(MyWorker_ProgressChanged);
                    worker.RunWorkerAsync();
                    worker.Dispose();
                }
            }
            catch (System.Exception ex1)
            {
                MessageBox.Show("exception: " + ex1);
            }
        }