示例#1
0
        // Create an MDI child.   Only creates it if not already open
        private void CreateMDIChild(Uri file, bool bMenuUpdate)
        {
            MDIChild mcOpen = null;

            if (file != null)
            {
                foreach (MDIChild mc in this.MdiChildren)
                {
                    if (file == mc.SourceFile)
                    {                                                   // we found it
                        mcOpen = mc;
                        break;
                    }
                }
            }
            if (mcOpen == null)
            {
                MDIChild mc = new MDIChild(this.ClientRectangle.Width * 3 / 4, this.ClientRectangle.Height * 3 / 4);
                mc.MdiParent = this;
                mc.Viewer.GetDataSourceReferencePassword = _GetPassword;
                mc.SourceFile = file;
                mc.Text       = file == null ? string.Empty : file.LocalPath;
                NoteRecentFiles(file, bMenuUpdate);
                mc.Show();
            }
            else
            {
                mcOpen.Activate();
            }
        }
示例#2
0
        public RdlReader(bool mono)
        {
            bMono = mono;
            GetStartupState();
            BuildMenus();
            InitializeComponent();
            Application.AddMessageFilter(this);

            this.Closing += new System.ComponentModel.CancelEventHandler(this.RdlReader_Closing);
            _GetPassword  = new RDL.NeedPassword(this.GetPassword);

            // open up the current files if any
            if (_CurrentFiles != null)
            {
                foreach (string file in _CurrentFiles)
                {
                    MDIChild mc = new MDIChild(this.ClientRectangle.Width * 3 / 4, this.ClientRectangle.Height * 3 / 4);
                    mc.MdiParent = this;
                    mc.Viewer.GetDataSourceReferencePassword = _GetPassword;
                    mc.SourceFile = file;
                    mc.Text       = file;
                    mc.Show();
                }
                _CurrentFiles = null;                           // don't need this any longer
            }
        }
示例#3
0
        public RdlReader(bool mono)
        {
            bMono = mono;
            GetStartupState();

            InitializeComponent();

            BuildMenus();
            // CustomReportItem load
            RdlEngineConfig.GetCustomReportTypes();

            Application.AddMessageFilter(this);

            this.Closing += new System.ComponentModel.CancelEventHandler(this.RdlReader_Closing);
            _GetPassword  = new RDL.NeedPassword(this.GetPassword);

            // open up the current files if any
            if (_CurrentFiles != null)
            {
                foreach (var dict in _CurrentFiles)
                {
                    MDIChild mc = new MDIChild(this.ClientRectangle.Width * 3 / 4, this.ClientRectangle.Height * 3 / 4);
                    mc.MdiParent = this;
                    mc.Viewer.GetDataSourceReferencePassword = _GetPassword;

                    mc.SourceFile = dict.Key;
                    if (dict.Value != string.Empty)
                    {
                        mc.Parameters = dict.Value;
                    }

                    mc.Text = dict.Key.LocalPath;

                    if (_CurrentFiles.Count == 1)
                    {
                        mc.WindowState = FormWindowState.Maximized;
                    }

                    mc.Show();
                }
                _CurrentFiles = null;           // don't need this any longer
            }
        }
示例#4
0
        public RdlReader(bool mono)
        {
            bMono = mono;
            GetStartupState();

            InitializeComponent();

            BuildMenus();

            Application.AddMessageFilter(this);

            this.Closing += new System.ComponentModel.CancelEventHandler(this.RdlReader_Closing);
            _GetPassword = new RDL.NeedPassword(this.GetPassword);

            // open up the current files if any
            if (_CurrentFiles != null)
            {
                foreach (var dict in _CurrentFiles)
                {
                    MDIChild mc = new MDIChild(this.ClientRectangle.Width * 3 / 4, this.ClientRectangle.Height * 3 / 4);
                    mc.MdiParent = this;
                    mc.Viewer.GetDataSourceReferencePassword = _GetPassword;

                    mc.SourceFile = dict.Key;
                    if(dict.Value != "")
                    {
                        mc.Parameters = dict.Value;
                    }

                    mc.Text = dict.Key.LocalPath;

                    if (_CurrentFiles.Count == 1)
                    {
                        mc.WindowState = FormWindowState.Maximized;
                    }

                    mc.Show();

                }
                _CurrentFiles = null;		// don't need this any longer
            }
        }
示例#5
0
 // Create an MDI child.   Only creates it if not already open
 private void CreateMDIChild(Uri file, bool bMenuUpdate)
 {
     MDIChild mcOpen = null;
     if (file != null)
     {
         foreach (MDIChild mc in this.MdiChildren)
         {
             if (file == mc.SourceFile)
             {							// we found it
                 mcOpen = mc;
                 break;
             }
         }
     }
     if (mcOpen == null)
     {
         MDIChild mc = new MDIChild(this.ClientRectangle.Width * 3 / 4, this.ClientRectangle.Height * 3 / 4);
         mc.MdiParent = this;
         mc.Viewer.GetDataSourceReferencePassword = _GetPassword;
         mc.SourceFile = file;
         mc.Text = file == null ? "" : file.LocalPath;
         NoteRecentFiles(file, bMenuUpdate);
         mc.Show();
     }
     else
         mcOpen.Activate();
 }
示例#6
0
		public RdlReader(bool mono)
		{
			bMono = mono;
			GetStartupState();
			BuildMenus();
			InitializeComponent();
			this.Closing += new System.ComponentModel.CancelEventHandler(this.RdlReader_Closing);
			_GetPassword = new RDL.NeedPassword(this.GetPassword);

			// open up the current files if any
			if (_CurrentFiles != null)
			{
				foreach (string file in _CurrentFiles)
				{
					MDIChild mc = new MDIChild(this.ClientRectangle.Width*3/4, this.ClientRectangle.Height*3/4);
					mc.MdiParent = this;
					mc.Viewer.GetDataSourceReferencePassword = _GetPassword;
					mc.SourceFile = file;
					mc.Text = file;
					mc.Show();
				}
				_CurrentFiles = null;		// don't need this any longer
			}

		}