Пример #1
0
        /// <summary>
        /// 画面サイズが変更されたときのイベント
        /// </summary>
        /// <param name="width">
        /// Width.
        /// </param>
        /// <param name="height">
        /// Height.
        /// </param>
        protected override void OnSizeAllocated(double width, double height)
        {
            base.OnSizeAllocated(width, height);

            SidePane.Opacity = 0;

            /* 初回限定の処理 */
            if (First)
            {
                /* ダイアログ関係のインスタンスを隠す */
                Shadow.TranslateTo(0, height, 0);
                Shadow.WidthRequest  = width;
                Shadow.HeightRequest = height;
                Shadow.Opacity       = 0;
                Shadow.IsVisible     = false;

                Dialog.TranslateTo(width / 2, height, 0);
                Dialog.WidthRequest  = DIALOGSIZE;
                Dialog.HeightRequest = DIALOGSIZE;
                Dialog.Opacity       = 0;

                /* フローチャートのレイアウト部分を配置
                 * FlowScroller.TranslateTo(0, 0, 0);
                 * FlowScroller.WidthRequest = width;
                 * FlowScroller.HeightRequest = height / 10 * 9;*/

                /* フッターメニューを配置 */
                Footer.TranslateTo(0, height / 10 * 9, 0);
                Footer.WidthRequest  = width;
                Footer.HeightRequest = height / 10;

                /* 図形選択メニューを隠す */
                SidePane.TranslateTo(-(width / 4), 0, 0);
                SidePane.WidthRequest  = width / 4;
                SidePane.HeightRequest = height - height / 10;

                /* カスタムダイアログ表示制御用インスタンスに格納 */
                ImitationDialog = new ImitationDialog
                {
                    Shadow = this.Shadow,
                    Dialog = this.Dialog,
                };

                First = false;
            }
            else
            {
                /* 図形選択メニューを隠す */
                //SidePane.LayoutTo(new Rectangle(-(width / 4), 0, width / 4, height), 200, Easing.CubicOut);

                //SidePaneShowing = !SidePaneShowing;
            }

            SidePane.Opacity = 1;
        }
Пример #2
0
        /// <summary></summary>
        public void Init(Mediator mediator, XmlNode configurationParameters)
        {
            m_mediator = mediator;
            mediator.AddColleague(this);

            areasLabel = m_mediator.StringTbl.LocalizeAttributeValue("Areas");

            m_sidepane              = new SidePane(MyControl, SidePaneItemAreaStyle.List);
            m_sidepane.ItemClicked += SidePaneItemClickedHandler;
            m_sidepane.TabClicked  += SidePaneTabClickedHandler;
        }
Пример #3
0
 /// <summary/>
 protected virtual void Dispose(bool fDisposing)
 {
     System.Diagnostics.Debug.WriteLineIf(!fDisposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
     if (fDisposing && !IsDisposed)
     {
         // dispose managed and unmanaged objects
         if (m_sidepane != null)
         {
             m_sidepane.Dispose();
         }
     }
     m_sidepane = null;
     IsDisposed = true;
 }
Пример #4
0
        /// <summary></summary>
        public void Init(Mediator mediator, PropertyTable propertyTable, XmlNode configurationParameters)
        {
            m_mediator      = mediator;
            m_propertyTable = propertyTable;

            areasLabel = StringTable.Table.LocalizeAttributeValue("Areas");

            m_sidepane = new SidePane(MyControl, SidePaneItemAreaStyle.List);
            m_sidepane.AccessibilityObject.Name = "sidepane";
            //m_sidepane.GetType().Name;
            m_sidepane.ItemClicked += SidePaneItemClickedHandler;
            m_sidepane.TabClicked  += SidePaneTabClickedHandler;

            mediator.AddColleague(this);
        }
Пример #5
0
        /// <summary>
        /// 図形選択メニューの表示、非表示する
        /// </summary>
        private async void SidePanelShow()
        {
            /* 表示フラグ反転 */
            SidePaneShowing = !SidePaneShowing;

            /* フラグによって表示、非表示にする */
            if (SidePaneShowing)
            {
                /* 表示 */
                await SidePane.TranslateTo(0, 0, 200, Easing.CubicIn);
            }
            else
            {
                /* 非表示 */
                await SidePane.TranslateTo(-(Width / 4), 0, 200, Easing.CubicOut);
            }
        }
Пример #6
0
        /// ------------------------------------------------------------------------------------
        /// <summary></summary>
        /// <param name="sbContainer">The control that contains the sidebar control.</param>
        /// <param name="ibContainer">The control that contains the information bar.</param>
        /// <param name="mediator">XCore message mediator through which messages are sent
        /// for tab and tab item clicks.</param>
        /// ------------------------------------------------------------------------------------
        public void Initialize(Control sbContainer, Control ibContainer, Mediator mediator)
        {
            if (sbContainer == null)
            {
                return;
            }

            m_mediator = mediator;

            // Setup context menu to allow switching between large and small icon mode.
            SetupSideBarsContextMenu();

            SetupInfoBar(ibContainer);

            m_sidePane              = new SidePane(sbContainer);
            m_sidePane.ItemClicked += new SidePane.ItemClickedEventHandler(HandleSidePaneItemClick);

            sbContainer.Resize += this.HandleParentContainerResize;
            UpdateSidebarLayout();
        }