public AddIssueRevit(UIDocument uidoc2, string folder) { try { uidoc = uidoc2; doc = uidoc.Document; snapshot = System.IO.Path.Combine(folder, "snapshot.png"); InitializeComponent(); TitleBox.Focus(); comboVisuals.ItemsSource = visuals; comboStatuses.ItemsSource = statuses; comboStatuses.SelectedIndex = 3; //select current visual style string currentV = doc.ActiveView.DisplayStyle.ToString(); for (int i = 0; i < comboVisuals.Items.Count; i++) { if (comboVisuals.Items[i].ToString() == currentV) { comboVisuals.SelectedIndex = i; } } updateImage(); } catch (System.Exception ex1) { TaskDialog.Show("Error!", "exception: " + ex1); } }
private void UIMouseDoubleClick(object sender, MouseButtonEventArgs e) { TitleLabel.Visibility = System.Windows.Visibility.Collapsed; TitleBox.Visibility = System.Windows.Visibility.Visible; TitleBox.Text = Host.NodeName; TitleBox.Focus(); e.Handled = true; }
public AttachmentEditWindow(string windowTitle, string defaultTitle, string defaultLink, InputCallback inputCallback, AttachmentEditWindowType type) { InitializeComponent(); this.inputCallback = inputCallback; this.type = type; Owner = Application.Current.MainWindow; Title = windowTitle; if (type == AttachmentEditWindowType.File) { LinkLabel.Content = "Datei:"; } else { LinkLabel.Content = "URL:"; FileButton.Visibility = Visibility.Collapsed; LinkBox.Width = TitleBox.Width; } TitleBox.Text = defaultTitle; LinkBox.Text = defaultLink; TitleBox.Focus(); TitleBox.CaretIndex = TitleBox.Text.Length; }
public AddIssueRevit(UIDocument uidoc2, string folder, ObservableCollection <Issuetype> _typesCollection, List <User> _assignees, ObservableCollection <Component> _compCollection, ObservableCollection <Priority> _PrioritiesCollection, bool comp, bool prior, bool assign) { try { uidoc = uidoc2; doc = uidoc.Document; snapshot = System.IO.Path.Combine(folder, "snapshot.png"); InitializeComponent(); TitleBox.Focus(); comboVisuals.ItemsSource = visuals; //comboStatuses.ItemsSource = statuses; //comboStatuses.SelectedIndex = 3; if (null != _typesCollection) { typesCollection = _typesCollection; issueTypeCombo.ItemsSource = typesCollection; issueTypeCombo.SelectedIndex = 0; } if (!comp) { compCollection = _compCollection; } else { ComponentsStack.Visibility = System.Windows.Visibility.Collapsed; } if (!assign && null != _assignees) { assignees = _assignees; } else { assigneeStack.Visibility = System.Windows.Visibility.Collapsed; } if (!prior && null != _PrioritiesCollection) { PrioritiesCollection = _PrioritiesCollection; priorityCombo.ItemsSource = PrioritiesCollection; priorityCombo.SelectedIndex = 0; } else { PriorityStack.Visibility = System.Windows.Visibility.Collapsed; } //select current visual style string currentV = doc.ActiveView.DisplayStyle.ToString(); for (int i = 0; i < comboVisuals.Items.Count; i++) { if (comboVisuals.Items[i].ToString() == currentV) { comboVisuals.SelectedIndex = i; } } updateImage(); } catch (System.Exception ex1) { TaskDialog.Show("Error!", "exception: " + ex1); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["ismoney"].ToString() == "False") { Response.Write("<script>alert('您还未缴费,只有查看任务权限!')</script>"); Server.Transfer("Memcenter.aspx", false); } if (!IsPostBack) { for (int i = 0; i < 24; i++) { Hour.Items.Add(Convert.ToString(i)); } for (int i = 0; i < 60; i++) { Minute.Items.Add(Convert.ToString(i)); } ID = Request.QueryString["id"]; // Session["User"] = "******"; Classify(); if (ID != null) { //Response.Write("Tony"); Deliver.Text = "修改"; using (SqlConnection MyConnection = new SqlConnection(SqlConnectionString)) { MyConnection.Open(); string MySelect = "select title,area,start,type,task_level,content,mno,who, receiver,state from task where task_id=@task_id"; SqlCommand SelectCommand = new SqlCommand(MySelect, MyConnection); SelectCommand.Parameters.AddWithValue("@task_id", ID); SqlDataReader rdr = SelectCommand.ExecuteReader(); if (rdr.Read()) { //拆分字符串 int i; string[] a = new string[4]; string[] result = rdr["start"].ToString().Split(new char[] { ' ', ':', ':' }); //Response.Write(result.Length); for (i = 0; i < 4; i++) { a[i] = result[i]; //Response.Write(a[i]+" "); } a[0].Replace('/', '-'); //Response.Write(a[0] + " "); TitleBox.Text = rdr["title"].ToString(); SpotBox.Text = rdr["area"].ToString(); TimeBox.Text = a[0]; //Response.Write(rdr["receiver"].ToString()); DropDownList2.SelectedValue = rdr["type"].ToString().Trim(); DropDownList1.SelectedValue = rdr["task_level"].ToString().Trim(); //Response.Write(DropDownList1.SelectedValue); DropDownList4.SelectedValue = rdr["state"].ToString().Trim(); if (rdr["receiver"].ToString() != null && rdr["receiver"].ToString().Trim() != "") { //Response.Write("你"); DropDownList3.SelectedValue = rdr["receiver"].ToString(); } else { DropDownList3.Enabled = false; //Response.Write("楠楠"); } Hour.SelectedValue = a[1]; Minute.SelectedValue = a[2]; ContentBox.Text = rdr["content"].ToString(); IssueBox.Text = rdr["who"].ToString(); } MyConnection.Close(); } } //SendMessage(81); } TitleBox.Focus(); }
public AddIssueDialog(string folder, ObservableCollection <Issuetype> _typesCollection, List <User> _assignees, ObservableCollection <Component> _compCollection, ObservableCollection <Priority> _PrioritiesCollection, bool comp, bool prior, bool assign) { try { snapshotPath = System.IO.Path.Combine(folder, "snapshot.png"); InitializeComponent(); TitleBox.Focus(); //comboVisuals.ItemsSource = visuals; //comboStatuses.ItemsSource = statuses; //comboStatuses.SelectedIndex = 3; if (null != _typesCollection) { typesCollection = _typesCollection; issueTypeCombo.ItemsSource = typesCollection; issueTypeCombo.SelectedIndex = 0; } if (!comp) { compCollection = _compCollection; } else { ComponentsStack.Visibility = System.Windows.Visibility.Collapsed; } if (!assign && null != _assignees) { assignees = _assignees; } else { assigneeStack.Visibility = System.Windows.Visibility.Collapsed; } if (!prior && null != _PrioritiesCollection) { PrioritiesCollection = _PrioritiesCollection; priorityCombo.ItemsSource = PrioritiesCollection; priorityCombo.SelectedIndex = 0; } else { PriorityStack.Visibility = System.Windows.Visibility.Collapsed; } //select current visual style //string currentV = null; // FIXME //for (int i = 0; i < comboVisuals.Items.Count; i++) //{ // if (comboVisuals.Items[i].ToString() == currentV) // { // comboVisuals.SelectedIndex = i; // } //} updateImage(); } catch (System.Exception ex1) { } }