----------------------------------------------------------------------------------------------------------------------------------------

Package managers for external libraries

  • NuGet (formerly known as NuPack) - Microsoft (developer-focused package management system for the .NET platform intent on simplifying the process of incorporating third party libraries into a .NET application during development)
  • OpenWrap - Sebastien Lambla - Open Source Dependency Manager for .net applications

Build Tools

  • Prebuild - Generate project files for all VS version, including major IDE's and tools like SharpDevelop, MonoDevelop, NAnt and Autotools

Dependency Injection/Inversion of Control

Logging

Validation

Design by Contract

Compression

Ajax

Data Mapper

ORM

Charting/Graphics

PDF Creators/Generators

Unit Testing/Mocking

Automated Web Testing

Misc Testing/Quality Support/Behavior Driven Development (BDD)

URL Rewriting

Web Debugging

  • Glimpse - Firebug for your webserver

Controls

MS Word/Excel Documents Manipulation

  • DocX to create, read, manipulate formatted word documents. Easy syntax, working nicely, actively developed. No Microsoft Office necessary.
  • Excel XML Writer allows creation of .XLS (Excel) files. No Microsoft Office necessary. Been a while since it has been updated. It also provides code generator to create code from already created XLS file (saved as xml). Haven't tested this but looks very promising. Too bad author is long time gone.
  • Excel Reader allows creation/reading of .XLS (Excel) files. No Microsoft Office necessary. Been a while since it has been updated.
  • Excel Package allows creation/reading of .XLSX (Excel 2007) files. No Microsoft Office necessary. Author is gone so it's out of date.
  • EPPlus is based on Excel Package and allows creation/reading of .XLSX (Excel 2007). It is actually the most advanced even comparing to NPOI.
  • NPOI is the .NET version of POI Java project at http://poi.apache.org/. POI is an open source project which can help you read/write xls, doc, ppt files.

Social Media

  • LinqToTwitter - Linq-based wrapper for all Twitter API functionality in C#
  • Facebook C# SDK - A toolkit for creating facebook applications / integrating websites with Facebook using the new Graph API or the old rest API.

Serialisation

  • sharpserializer - xml/binary serializer for wpf, asp.net and silverlight
  • protobuf-net - .NET implementation of google's cross-platform binary serializer (for all .NET platforms)

Unclassified

'Programming' 카테고리의 다른 글

Windwos 7에서 IIS 7.0 설치하기  (0) 2011.03.14
Window Server 2008에서 IIS 7.0 설치하기  (0) 2011.03.14
정보처리기술사 개요  (0) 2010.04.24

Microsoft 에서 제공 하고 있는 ControlTemplate Examples 입니다.

ListBox, TreeView등등의 컨트롤에 기본적으로 적용되어있는 Template을 확인 할 수 있습니다.

컨트롤에 맞는 Template 으로 커스터 마이징이 가능 합니다.

 

[제공 Template]

n  Button ControlTemplate Example

n  CheckBox ControlTemplate Example

n  ComboBox ControlTemplate Example

n  ComboBoxItem ControlTemplate Example

n  ContextMenu ControlTemplate Example

n  DocumentViewer ControlTemplate Example

n  Expander ControlTemplate Example

n  Frame ControlTemplate Example

n  GroupBox ControlTemplate Example

n  Label ControlTemplate Example

n  ListBox ControlTemplate Example

n  ListBoxItem ControlTemplate Example

n  ListView ControlTemplate Example

n  ListViewItem ControlTemplate Example

n  Menu ControlTemplate Example

n  MenuItem ControlTemplate Example

n  NavigationWindow ControlTemplate Example

n  ProgressBar ControlTemplate Example

n  RadioButton ControlTemplate Example

n  ScrollBar ControlTemplate Example

n  ScrollViewer ControlTemplate Example

n  Slider ControlTemplate Example

n  StatusBar ControlTemplate Example

n  TabControl ControlTemplate Example

n  TabItem ControlTemplate Example

n  TextBox ControlTemplate Example

n  ToolBar ControlTemplate Example

n  ToolTip ControlTemplate Example

n  TreeView ControlTemplate Example

n  TreeViewItem ControlTemplate Example

n  Window ControlTemplate Example

 

다운로드는 아래 사이트에서 받아가세요!

 

 

ControlTemplate Examples : http://msdn.microsoft.com/en-us/library/vstudio/aa970773(v=vs.90).aspx

Behind Code에서 Master Page의 Title 변경 하는 방법에 대해 알아 보겠습니다.

 

// Master Page에 등록되어있는 PlaceHolder 명과 설정할 Title 값을 매개변수로 입력 합니다. 

         private void SetTitle(string placeHolderName, string title)
        {
            try
            {

// 현재 페이지의 MasterPage의 PlaceHolder을 가져옵니다. 

                ContentPlaceHolder contentPlaceHolder = (ContentPlaceHolder)Page.Master.FindControl(placeHolderName);
                contentPlaceHolder.Controls.Clear();
                LiteralControl literalControl = new LiteralControl();
                literalControl.Text = title;

// Title을 등록 한 후 가져온 PlaceHolder Control에 입력 합니다. 

                contentPlaceHolder.Controls.Add(literalControl);
            }
            catch {
            }
        }

 

함수 호출은 아래와 같이!!

SetTitle("PlaceHolderPageTitle", "타이틀수정!");

출처 : http://social.technet.microsoft.com/Forums/ko-KR/sharepointportalserverko/thread/12c26c48-cee3-4cd8-865b-ece9bfbf81c1

 

제 경우는 IIS POOL 중에 SecurityTokenServiceApplicationPool이 중지 되어 있어서 오류가 발생 했네요.

다시 시작 했더니 해결 되었습니다.

 

아래 해결 방안 참고하세요!

 

[해결 방안]
Step1> You can try to re-run SharePoint 2010 products configuration wizard to see any problems that still exist.
Step2> Go to IIS and see the status of SecurityTokenServiceApplicationPool service, whether it is stopped or not, restart the pool.
Step3> Go to manage web application services, review the status of Security Token Service application , try to restart.
Step4> In Central Administration>Security>Configure Service Account>Change the service account for the Security Token Service application to some other managed account.
Step5> If the issue persists, try the resolution in this blog: http://blogs.msdn.com/b/sowmyancs/archive/2010/07/16/sharepoint-2010-service-applications-bcs-metadata-access-service-are-not-working.aspx

C# Web Project를 이용해 SP 서버의 사이트, 목록등에 대한 구조를 가져오는 방법입니다.

 

※ 주의 : Debug 시 x64 로 설정 하셔야 합니다.

 

[using]

using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

 

[code]

             // Site 가져오기
            SPSite root = new SPSite("http://moros/"); // SP 사이트 명 입력

 

            SPSiteCollection siteCol = root.WebApplication.Sites;

 

            // SiteCollection 루프
            foreach (SPSite site in siteCol)
            {
                // Site URL 출력
                Response.Write(site.Url.ToString()+"<br>");
                // Web 루프
                foreach (SPWeb web in site.AllWebs)
                {
                    // Web Title 출력
                    Response.Write(web.Title + "<br>");
                    // List 루프
                    foreach (SPList list in web.Lists)
                    {
                        // List Title 출력
                        Response.Write(list.Title + "<br>");
                        // ListItem 루프
                        foreach (SPListItem item in list.Items)
                        {
                            // ListItem Title 출력
                            Response.Write(item.Title + "<br>");
                        }
                    }
                }
            }

C# Console Project를 이용해 SP 서버의 사이트, 목록등에 대한 구조를 가져오는 방법입니다.

 

※ 주의 : Debug 시 x64 로 설정 하셔야 합니다.

 

[using]

using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;

 

[code]

            // SP 로컬 서버 호출
            SPFarm farm = SPFarm.Local;
            // SP WebService 호출
            SPWebService service = farm.Services.GetValue<SPWebService>("");
            
            // WebApplication 루프
            foreach (SPWebApplication webapp in service.WebApplications)
            {
                // WebApplication 이름 출력
                Console.WriteLine(webapp.Name);
                // SPSite 루프
                foreach (SPSite site in webapp.Sites)
                {
                    // SPSite URL 출력
                    Console.WriteLine(site.Url);
                    // SPWeb 루프
                    foreach (SPWeb web in site.AllWebs)
                    {
                        // SPWeb Title 출력
                        Console.WriteLine(web.Title);
                        // SPList 루프
                        foreach (SPList list in web.Lists)
                        {
                            // SPList Title 출력
                            Console.WriteLine(list.Title);
                            // SPListItem 루프
                            foreach (SPListItem Item in list.Items)
                            {
                                // SPListItem Title 출력
                                Console.WriteLine(Item.Title);
                            }
                        }
                    }
                }
            }

 

 

Sharepoint 2013 Designer Tool은 Sharepoint 개발 툴인 Visual Studio 2012를 통하지 않고도 쉽게 사이트를 개발, 수정 할 수 있도록 도와 주는 툴 입니다.

 

 

아래 링크를 통해 다운로드 할 수 있습니다.

 

[Sharepoint 2013 Designer 다운로드]

 

 

 

 

 

Windows 8을 사용할때 간혹 라이브러리를 클릭 했을때 pictures.library-ms 오류가 발생 하는 경우가 있습니다.

해당 오류가 발생 하면 해당 라이브러리를 삭제 후에 복구를 해주면 오류가 사라집니다.

 

 

1. 윈도우 탐색기 또는 내컴퓨터를 클릭 한 후 오류가 발생하는 라이브러리를 오른쪽 마우스로 클릭 하여 삭제를 합니다.

 

 

2. 삭제가 완료 되면 라이브러리 최상단 카테고리를 마우스 오른쪽 버튼을 클릭 후 기본 라이브러리 복원을 선택 합니다.

 

 

3. 복구가 완료되면 삭제한 라이브 러리가 생성 됩니다!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

출처 : http://social.msdn.microsoft.com/Forums/en/wpf/thread/d32bb0af-b14f-4e88-ad36-098d11cd375c

 

WPF의 StackPanel 컨트롤에 들어있는 아이템들에 Drag and Drop 기능을 입혀 보겠습니다.

 

1. StackPanel을 만들고 AllowDrop 속성 및 마우스 이벤트를 등록 합니다.
   테스트를 위해 TextBlock 아이템을 넣어 놓았습니다.

<StackPanel x:Name="Container" Orientation="Vertical"
                            HorizontalAlignment="Stretch"
                                AllowDrop="True"
                                PreviewMouseLeftButtonDown="Container_PreviewMouseLeftButtonDown"
                                PreviewMouseLeftButtonUp="Container_PreviewMouseLeftButtonUp"
                                PreviewMouseMove="Container_PreviewMouseMove"
                                Drop="Container_Drop">
           
            <TextBlock Text="1번" FontSize="20" HorizontalAlignment="Stretch" TextAlignment="Center" Background="Red"/>
            <TextBlock Text="2번" FontSize="20" HorizontalAlignment="Stretch" TextAlignment="Center" Background="Blue"/>
            <TextBlock Text="3번" FontSize="20" HorizontalAlignment="Stretch" TextAlignment="Center" Background="Yellow"/>
            <TextBlock Text="4번" FontSize="20" HorizontalAlignment="Stretch" TextAlignment="Center" Background="Beige"/>
           
        </StackPanel>

 

 

2. Behind Code에 추가된 이벤트 함수에 Drag and Drop에 필요한 변수를 등록 합니다.

 

        private bool _isDown;  // 마우스 클릭 체크
        private bool _isDragging; // 컨트롤을 드레깅 하는지 체크
        private Point _startPoint; // Drag 하는 아이템의 시작 위치
        private UIElement _realDragSource; 
        private UIElement _dummyDragSource = new UIElement();

 

3. 마우스를 클릭 했을때 StackPanel 안에 있는 자식 컨트롤을 선택 하는지 체크 하는 코드를 입력 합니다.

 

        private void Container_PreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (e.Source == this.Container)
            {
            }
            else
            {
                _isDown = true;
                _startPoint = e.GetPosition(this.Container);
            }
        }

 

4. 마우스를 땠을때 변수를 초기화 시켜 주는 코드를 입력 합니다.

        private void Container_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            _isDown = false;
            _isDragging = false;
            if (_realDragSource != null)
            {
                _realDragSource.ReleaseMouseCapture();
            }
        }

 

5. 컨트롤을 드레깅 하는동안 위치를 확인 하는 코드를 입력 합니다.

        private void Container_PreviewMouseMove(object sender, MouseEventArgs e)
        {
            if (_isDown)
            {
                if ((_isDragging == false) && ((Math.Abs(e.GetPosition(this.Container).X - _startPoint.X) > SystemParameters.MinimumHorizontalDragDistance) ||
                    (Math.Abs(e.GetPosition(this.Container).Y - _startPoint.Y) > SystemParameters.MinimumVerticalDragDistance)))
                {
                    _isDragging = true;
                    _realDragSource = e.Source as UIElement;
                    _realDragSource.CaptureMouse();
                    DragDrop.DoDragDrop(_dummyDragSource, new DataObject("UIElement", e.Source, true), DragDropEffects.Move);
                }
            }
        }

 

6. 컨트롤을 Drop 시켰을때 컨트롤들의 순서를 바꿔주는 코드를 입력합니다.

         private void Container_Drop(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent("UIElement"))
            {
                UIElement droptarget = e.Source as UIElement;
                int droptargetIndex = -1, i = 0;

 

                foreach (UIElement element in this.Container.Children)
                {
                    if (element.Equals(droptarget))
                    {
                        droptargetIndex = i;
                        break;
                    }
                    i++;
                }
                if (droptargetIndex != -1)
                {
                    this.Container.Children.Remove(_realDragSource);
                    this.Container.Children.Insert(droptargetIndex, _realDragSource);
                }

 

                _isDown = false;
                _isDragging = false;
                _realDragSource.ReleaseMouseCapture();
            }
        }

 

샘플 다운로드 :StackPanelDragAndDrop.zip

 

Silverlight에서 웹 팝업 창을 띄우기

 

using System.Windows.Browser;

 

HtmlPage.Window.Navigate(new Uri("http://www.naver.com", UriKind.Absolute), "_blank");

 

+ Recent posts