private void btn_SOSPESI_Click(object sender, RoutedEventArgs e)
        {
            XmlNode node = _x.Document.SelectSingleNode("//Dato[@ID=\"100003\"]");

            Sospesi o = new Sospesi();

            o.Owner = this;

            if (System.Windows.SystemParameters.PrimaryScreenWidth < 1100 || System.Windows.SystemParameters.PrimaryScreenHeight < 600)
            {
                o.Height    = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                o.Width     = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
                o.MaxHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                o.MaxWidth  = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
                o.MinHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                o.MinWidth  = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
            }
            else
            {
                o.Width  = 1100;
                o.Height = 600;
            }

            o.ReadOnly = ReadOnly;

            o.Stato = Stato;



            o.Load(node.Attributes["ID"].Value, IDCliente, IDSessione);

            o.ShowDialog();
        }
コード例 #2
0
        private void btn_SOSPESI_Click(object sender, RoutedEventArgs e)
        {
            Sospesi o = new Sospesi();

            o.Owner = this;

            if (System.Windows.SystemParameters.PrimaryScreenWidth < 1100 || System.Windows.SystemParameters.PrimaryScreenHeight < 600)
            {
                o.Height    = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                o.Width     = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
                o.MaxHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                o.MaxWidth  = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
                o.MinHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                o.MinWidth  = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
            }
            else
            {
                o.Width  = 1100;
                o.Height = 600;
            }

            o.ReadOnly = ReadOnly;

            o.Stato = Stato;



            o.Load("100003", IDCliente, IDSessione);

            o.ShowDialog();
        }
コード例 #3
0
        //----------------------------------------------------------------------------+
        //                           OnItemMouseDoubleClick                           |
        //----------------------------------------------------------------------------+

        private void OnItemMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (e.ClickCount != 2)
            {
                return;
            }
            XmlNode node;

            try { node = ((XmlNode)(tvMain.SelectedItem)); }
            catch (Exception ex)
            {
                string log = ex.Message;
                e.Handled = true;
                return;
            }
            if (node == null)
            {
                e.Handled = true;
                return;
            }
            string aliasnodo = ((XmlAttribute)(((Image)(sender)).ToolTip)).Value;
            string idnodo    = node.Attributes["ID"].Value;

            Sospesi o = new Sospesi();

            o.Owner = this;
            if (System.Windows.SystemParameters.PrimaryScreenWidth < 1100 || System.Windows.SystemParameters.PrimaryScreenHeight < 600)
            {
                o.Height    = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                o.Width     = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
                o.MaxHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                o.MaxWidth  = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
                o.MinHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 90.0 / 100.0;
                o.MinWidth  = System.Windows.SystemParameters.PrimaryScreenWidth * 90.0 / 100.0;
            }
            else
            {
                o.Width  = 1100;
                o.Height = 600;
            }
            o.ReadOnly = false;


            o.Load(idnodo, IDCliente, aliasnodo, idtree);
            o.ShowDialog();
            if (o.Changed == true)
            {
                firsttime = true;
                LoadTreeSource();
            }
        }